From 2a7fdef7e6deccaee121217c1544dba4647f1f97 Mon Sep 17 00:00:00 2001 From: looooo Date: Thu, 9 Mar 2017 11:07:44 +0100 Subject: [PATCH] App: FreeCADInit.py: remove unused import + add local Mod dir --- src/App/FreeCADInit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index 4510e13c26..bb38600f84 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -36,7 +36,7 @@ import FreeCAD def InitApplications(): try: - import sys,os,traceback,io + import sys,os,traceback except ImportError: FreeCAD.Console.PrintError("\n\nSeems the python standard libs are not installed, bailing out!\n\n") raise @@ -96,7 +96,7 @@ def InitApplications(): # this allows importing with: # from FreeCAD.Module import package - FreeCAD.__path__ = [ModDir, Lib64Dir, LibDir] + FreeCAD.__path__ = [ModDir, Lib64Dir, LibDir, HomeMod] # also add these directories to the sys.path to # not change the old behaviour. once we have moved to @@ -112,6 +112,7 @@ def InitApplications(): if (os.path.exists(InstallFile)): try: # XXX: This looks scary securitywise... + with open(InstallFile) as f: exec(f.read()) except Exception as inst: