use __ModDirs__ for module directories and set the search path of FreeCAD to the base directories, which contain all the modules

This commit is contained in:
looooo
2017-03-08 19:37:03 +01:00
committed by wmayer
parent c2cdc9eded
commit bcfac0e9b7
2 changed files with 20 additions and 6 deletions

View File

@@ -101,7 +101,7 @@ def InitApplications():
import sys,os,traceback
# Searching modules dirs +++++++++++++++++++++++++++++++++++++++++++++++++++
# (additional module paths are already cached)
ModDirs = FreeCAD.__path__
ModDirs = FreeCAD.__ModDirs__
#print ModDirs
Log('Init: Searching modules...\n')
for Dir in ModDirs:
@@ -116,9 +116,9 @@ def InitApplications():
Log('Init: Initializing ' + Dir + '... failed\n')
Log('-'*100+'\n')
Log(traceback.format_exc())
Log(output.getvalue())
Log('-'*100+'\n')
Err('During initialization the error ' + str(inst) + ' occurred in ' + InstallFile + '\n')
Err('Please look into the log file for further information')
else:
Log('Init: Initializing ' + Dir + '... done\n')
else: