Merge pull request #2157 from easyw/master

added try,except for OpenCamLib test on Path WB
This commit is contained in:
sliptonic
2019-05-10 08:24:55 -05:00
committed by GitHub
2 changed files with 13 additions and 3 deletions

View File

@@ -66,7 +66,13 @@ def Startup():
from PathScripts import PathSimpleCopy
from PathScripts import PathSimulatorGui
from PathScripts import PathStop
from PathScripts import PathSurfaceGui
try:
import ocl
from PathScripts import PathSurfaceGui
except:
import FreeCAD
FreeCAD.Console.PrintError("OpenCamLib is not working!\n")
pass
from PathScripts import PathToolController
from PathScripts import PathToolLibraryManager
Processed = True

View File

@@ -164,5 +164,9 @@ def setDefaultTaskPanelLayout(style):
preferences().SetInt(DefaultTaskPanelLayout, style)
def experimentalFeaturesEnabled():
return preferences().GetBool(EnableExperimentalFeatures, False)
try:
import ocl
return preferences().GetBool(EnableExperimentalFeatures, False)
except:
FreeCAD.Console.PrintError("OpenCamLib is not working!\n")
return False