a little improvement to https://github.com/dcowden/cadquery/pull/87
This commit is contained in:
parent
d36e5a10b7
commit
205a6ef01a
|
@ -96,10 +96,17 @@ def _fc_path():
|
|||
return _PATH
|
||||
|
||||
|
||||
|
||||
#Make sure that the correct FreeCAD path shows up in Python's system path
|
||||
no_library_path = ImportError('cadquery was unable to determine freecads library path')
|
||||
try:
|
||||
import FreeCAD
|
||||
except ImportError:
|
||||
#Make sure that the correct FreeCAD path shows up in Python's system path
|
||||
path = _fc_path()
|
||||
if path: sys.path.insert(0, _fc_path())
|
||||
else: raise ImportError('cadquery was unable to determine freecads library path')
|
||||
if path:
|
||||
sys.path.insert(0, _fc_path())
|
||||
try:
|
||||
import FreeCAD
|
||||
except ImportError:
|
||||
raise no_library_path
|
||||
else: raise no_library_path
|
||||
|
|
Loading…
Reference in New Issue
Block a user