Skip to content

Commit

Permalink
getdatapaths: return unique list
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Sep 15, 2022
1 parent ee90629 commit 247f318
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GooseHDF5/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def getdatapaths(
:return: List of paths (always absolute, so includes the ``root`` if used).
"""
kwargs = dict(root=root, max_depth=max_depth, fold=fold, fold_symbol=fold_symbol)
return list(getdatasets(file, **kwargs)) + list(getgroups(file, has_attrs=True, **kwargs))
ret = list(getdatasets(file, **kwargs)) + list(getgroups(file, has_attrs=True, **kwargs))
return list(set(ret))


def getgroups(
Expand Down

0 comments on commit 247f318

Please sign in to comment.