Skip to content

Commit

Permalink
Fix for h5py inconsistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkilcher committed Nov 13, 2018
1 parent 121003c commit 7f5070b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dolfyn/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__version__ = '0.8.2'
__version__ = '0.8.3'
__prog_name__ = 'DOLfYN'
__version_date__ = 'Nov-12-2018'
__version_date__ = 'Nov-13-2018'


def ver2tuple(ver):
Expand Down
8 changes: 7 additions & 1 deletion dolfyn/io/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
from six import string_types
import sys
from .. import _version as _ver
try:
# There is an organizational inconsistenty in different versions of h5py.
# Some have the 'highlevel' module
h5_group = h5.highlevel.Group
except AttributeError:
h5_group = h5.Group


if sys.version_info >= (3, 0):
Expand Down Expand Up @@ -621,7 +627,7 @@ def iter_groups(self, groups=None, where='/', no_essential=False):
"""

for grp in list(self.get_group(where).values()):
if grp.__class__ is h5.highlevel.Group:
if grp.__class__ is h5_group:
gnm = self.get_name(grp)

if groups is None:
Expand Down

0 comments on commit 7f5070b

Please sign in to comment.