summaryrefslogtreecommitdiff
path: root/silx/gui/data/Hdf5TableView.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/data/Hdf5TableView.py')
-rw-r--r--silx/gui/data/Hdf5TableView.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/silx/gui/data/Hdf5TableView.py b/silx/gui/data/Hdf5TableView.py
index 9e28fbf..d7c33f3 100644
--- a/silx/gui/data/Hdf5TableView.py
+++ b/silx/gui/data/Hdf5TableView.py
@@ -30,12 +30,14 @@ from __future__ import division
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "05/07/2018"
+__date__ = "12/02/2019"
import collections
import functools
import os.path
import logging
+import h5py
+
from silx.gui import qt
import silx.io
from .TextFormatter import TextFormatter
@@ -44,11 +46,6 @@ from silx.gui.widgets import HierarchicalTableView
from ..hdf5.Hdf5Formatter import Hdf5Formatter
from ..hdf5._utils import htmlFromDict
-try:
- import h5py
-except ImportError:
- h5py = None
-
_logger = logging.getLogger(__name__)
@@ -198,11 +195,9 @@ class _CellFilterAvailableData(_CellData):
}
def __init__(self, filterId):
- import h5py.version
if h5py.version.hdf5_version_tuple >= (1, 10, 2):
# Previous versions only returns True if the filter was first used
# to decode a dataset
- import h5py.h5z
self.__availability = h5py.h5z.filter_avail(filterId)
else:
self.__availability = "na"
@@ -416,7 +411,7 @@ class Hdf5TableModel(HierarchicalTableView.HierarchicalTableModel):
self.__data.addHeaderRow(headerLabel="Data info")
- if h5py is not None and hasattr(obj, "id") and hasattr(obj.id, "get_type"):
+ if hasattr(obj, "id") and hasattr(obj.id, "get_type"):
# display the HDF5 type
self.__data.addHeaderValueRow("HDF5 type", self.__formatHdf5Type)
self.__data.addHeaderValueRow("dtype", self.__formatDType)