diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-09 10:20:20 +0200 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2019-07-09 10:20:20 +0200 |
commit | 654a6ac93513c3cc1ef97cacd782ff674c6f4559 (patch) | |
tree | 3b986e4972de7c57fa465820367602fc34bcb0d3 /silx/io/utils.py | |
parent | a763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (diff) |
New upstream version 0.11.0+dfsg
Diffstat (limited to 'silx/io/utils.py')
-rw-r--r-- | silx/io/utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/silx/io/utils.py b/silx/io/utils.py index 930c84e..f294101 100644 --- a/silx/io/utils.py +++ b/silx/io/utils.py @@ -52,7 +52,7 @@ except ImportError as e: logger = logging.getLogger(__name__) -NEXUS_HDF5_EXT = [".h5", ".nx5", ".nxs", ".hdf", ".hdf5", ".cxi"] +NEXUS_HDF5_EXT = [".h5", ".nx5", ".nxs", ".hdf", ".hdf5", ".cxi"] """List of possible extensions for HDF5 file formats.""" @@ -460,7 +460,10 @@ def _open_local_file(filename): "File '%s' can't be read as a numpy file." % filename)) if h5py.is_hdf5(filename): - return h5py.File(filename, "r") + try: + return h5py.File(filename, "r") + except OSError: + return h5py.File(filename, "r", libver='latest', swmr=True) try: from . import fabioh5 |