FEM: bare Python exceptions, fix the Import ones

This commit is contained in:
Bernd Hahnebach
2019-06-30 23:13:57 +02:00
parent b8f0de88bb
commit c28684d9db
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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