FEM: bare Python exceptions, fix the Import ones
This commit is contained in:
@@ -30,7 +30,7 @@ import FreeCAD
|
||||
|
||||
try:
|
||||
import fenics
|
||||
except:
|
||||
except ImportError:
|
||||
FreeCAD.Console.PrintError("No Fenics modules found, please install them.")
|
||||
else:
|
||||
import numpy as np
|
||||
|
||||
@@ -105,7 +105,7 @@ class TestFemCommon(unittest.TestCase):
|
||||
fcc_print('Try importing {0} ...'.format(mod))
|
||||
try:
|
||||
im = __import__('{0}'.format(mod))
|
||||
except:
|
||||
except ImportError:
|
||||
im = False
|
||||
if not im:
|
||||
# to get an error message what was going wrong
|
||||
|
||||
Reference in New Issue
Block a user