0021308: Remove hard-coded dependency of the external mesh plugins from the SMESH module

protect from exceptions at importing plugins
This commit is contained in:
eap 2012-03-11 08:53:28 +00:00
parent 649673b639
commit 8b26d4794f

View File

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