From c565cf0c7884d81adc8ec0250ad58b1bcd008675 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 21 Feb 2014 13:29:22 +0100 Subject: [PATCH] + Handle empty system path in init script --- src/App/FreeCADInit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index a7c3fb4d4256..ea39fd90adde 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -106,7 +106,10 @@ def InitApplications(): sys.path.insert(0,ModDir) Log("Using "+ModDir+" as module path!\n") # new paths must be prepended to avoid to load a wrong version of a library - os.environ["PATH"] = PathExtension + os.environ["PATH"] + try: + os.environ["PATH"] = PathExtension + os.environ["PATH"] + except KeyError: + os.environ["PATH"] = PathExtension path = os.environ["PATH"].split(os.pathsep) Log("System path after init:\n") for i in path: