Commit 10286497 authored by Baptiste Durand's avatar Baptiste Durand

Correction of exceptions handling when imports fail (-> python 3.9)

parent 78695781
......@@ -26,29 +26,29 @@ formatter = logging.Formatter(
try:
from . import geometry, mesh_tools, mesh_generate
except ImportError:
except (ImportError, ModuleNotFoundError):
pckg_logger.warning("Import of geometry and mesh generating submodules fails")
try:
from . import materials
except ImportError:
except (ImportError, ModuleNotFoundError):
pckg_logger.warning("Import of material submodule fails")
try:
from . import periodicity
except ImportError:
except (ImportError, ModuleNotFoundError):
pckg_logger.warning("Import of periodicity submodule fails")
try:
from . import toolbox_gmsh
except ImportError:
except (ImportError, ModuleNotFoundError):
pckg_logger.warning("Import of toolbox_gmsh submodule fails")
try:
from . import full_scale_pb, homog2d, part, toolbox_FEniCS
except ImportError:
except (ImportError, ModuleNotFoundError):
pckg_logger.warning(
"One of the following submodule imports fails : full_scale_pb, homog2d, part, toolbox_FEniCS"
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment