]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
sat #8588 : reset LD_LIBRARY_PATH and PYTHONPATH
authorcrouzet <nicolas.crouzet@cea.fr>
Fri, 18 Jan 2019 09:22:09 +0000 (10:22 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Fri, 18 Jan 2019 09:22:09 +0000 (10:22 +0100)
src/environment.py

index 283251972fa4f353a13658848f42a1459ebef712..79526ffb3fa9c70dffeea317f0ab4b2c7e5b4601 100644 (file)
@@ -398,6 +398,14 @@ class SalomeEnviron:
             self.cfg.APPLICATION.environ.PRODUCT_ROOT_DIR = src.pyconf.Reference(self.cfg, src.pyconf.DOLLAR, "workdir")
             DBG.write("set_application_env: add APPLICATION.environ.PRODUCT_ROOT_DIR", self.cfg.APPLICATION.environ)
           
+        # these sensitive variables are reset to avoid bad environment interactions
+        self.add_line(1)
+        self.add_comment("reset these sensitive variables to avoid bad environment interactions")
+        self.add_comment("comment these to lines if you wish a different behaviour")
+        self.set("LD_LIBRARY_PATH", "")
+        self.set("PYTHONPATH", "")
+        self.add_line(1)
+
         # Set the variables defined in the "environ" section
         if 'environ' in self.cfg.APPLICATION:
             # we write PRODUCT environment it in order to conform to