Salome HOME
0021308: Remove hard-coded dependency of the external mesh plugins from the SMESH...
authoreap <eap@opencascade.com>
Sun, 11 Mar 2012 08:53:28 +0000 (08:53 +0000)
committereap <eap@opencascade.com>
Sun, 11 Mar 2012 08:53:28 +0000 (08:53 +0000)
   protect from exceptions at importing plugins

src/SMESH_SWIG/smesh.py

index 2a9dcfa3d8fbd13263abfd2d39820fda439228d3..e9f7e01142f4654d1e03f13f5b0a7080bf675a67 100644 (file)
@@ -45,7 +45,10 @@ from smeshDC import Mesh, algoCreator
 for pluginName in os.environ["SMESH_MeshersList"].split(":"):
 
   pluginName += "DC"
-  exec("from %s import *" % pluginName )
+  try:
+    exec("from %s import *" % pluginName )
+  except:
+    continue
   exec("import %s" % pluginName )
   plugin = eval(pluginName)