From 654a6ac93513c3cc1ef97cacd782ff674c6f4559 Mon Sep 17 00:00:00 2001 From: Alexandre Marie Date: Tue, 9 Jul 2019 10:20:20 +0200 Subject: New upstream version 0.11.0+dfsg --- silx/io/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'silx/io/utils.py') 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 -- cgit v1.2.3