summaryrefslogtreecommitdiff
path: root/silx/io/utils.py
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:39 +0200
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2019-07-09 10:20:39 +0200
commit032cc0bed452e96456cdc499f98ccaf473416978 (patch)
tree514f4532d1ab4dcbea0495488e6dd30bc422a94b /silx/io/utils.py
parent8ff15764a99df31a5d75e1e19a89b413408cfcc2 (diff)
parent654a6ac93513c3cc1ef97cacd782ff674c6f4559 (diff)
Update upstream source from tag 'upstream/0.11.0+dfsg'
Update to upstream version '0.11.0+dfsg' with Debian dir 711605a3a57c11c3b5d699da5819c94403f8ac62
Diffstat (limited to 'silx/io/utils.py')
-rw-r--r--silx/io/utils.py7
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