Skip to content

Commit

Permalink
closes #1091
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Oct 28, 2024
1 parent 6742fc1 commit ac0192a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/PyMca5/PyMcaGui/io/hdf5/HDF5Widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,14 @@ def children(self):
for i in range(len(finalList)):
# avoid an error at silx level with the linechecking "if finalList[i][1] and "
finalListIsTrue = True
if hasattr(finalList[i][1], "shape"):
if not len(finalList[i][1].shape):
finalListIsTrue = False
dataset = finalList[i][1]
if hasattr(dataset, "shape"):
if not len(dataset.shape):
# it can still be a string
if hasattr(dataset, "dtype") and safe_str(dataset.dtype).startswith("|S"):
pass
else:
finalListIsTrue = False
if finalListIsTrue and not isinstance(finalList[i][1], str):
finalList[i][1]._posixPath = posixpath.join(self.name,
finalList[i][0])
Expand Down

0 comments on commit ac0192a

Please sign in to comment.