summaryrefslogtreecommitdiff
path: root/silx/io/utils.py
diff options
context:
space:
mode:
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