From e4e17ece34900e5bc9afc84a6a37b77f0612e95a Mon Sep 17 00:00:00 2001 From: crouzet Date: Wed, 16 Oct 2019 16:50:38 +0200 Subject: [PATCH] add appenPath to python2 template --- src/fileEnviron.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/fileEnviron.py b/src/fileEnviron.py index 3c173e2..aa89e0d 100644 --- a/src/fileEnviron.py +++ b/src/fileEnviron.py @@ -906,6 +906,18 @@ launcher_tail_py2="""\ logging.getLogger("salome").error(e) sys.exit(1) # +# salomeContext only prepend variables, we use our own appendPath when required +def appendPath(name, value, separator=os.pathsep): + if value == '': + return + + value = os.path.expandvars(value) # expand environment variables + env = os.getenv(name, None) + if env is None: + os.environ[name] = value + else: + os.environ[name] = env + separator + value + if __name__ == "__main__": args = sys.argv[1:] -- 2.39.2