From 75149cc0cd88c5510a915c4e7dda6aee09387380 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 14 Oct 2016 07:04:46 +0200 Subject: [PATCH] h5py is not available on IronPython (Abaqus python environment) --- lib/damask/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/damask/__init__.py b/lib/damask/__init__.py index d1496a1b7..c71d50a94 100644 --- a/lib/damask/__init__.py +++ b/lib/damask/__init__.py @@ -8,7 +8,10 @@ with open(os.path.join(os.path.dirname(__file__),'../../VERSION')) as f: from .environment import Environment # noqa from .asciitable import ASCIItable # noqa -from .h5table import H5Table # noqa +try: + from .h5table import H5Table # noqa +except ImportError: + print("h5py module not found") from .config import Material # noqa from .colormaps import Colormap, Color # noqa from .orientation import Quaternion, Rodrigues, Symmetry, Orientation # noqa