Skip to content

Commit df89faa

Browse files
Merge pull request #1114 from sergey-yaroslavtsev/h5py-externallink-fix
Data in h5 files with external link is not crushing on right click.
2 parents 0e7324b + 244642b commit df89faa

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/PyMca5/PyMcaGui/io/hdf5/NexusInfo.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,15 @@ def get_motor_positions(hdf5File, node):
128128
if not nxentry_name:
129129
return dict()
130130

131-
nxentry = hdf5File[nxentry_name]
131+
if hasattr(node, "file"):
132+
source_file = node.file
133+
else:
134+
source_file = hdf5File
135+
136+
nxentry = source_file[nxentry_name]
132137
if not isinstance(nxentry, h5py.Group):
133138
return dict()
134139

135-
positions = getStartingPositionerValues(hdf5File, nxentry_name)
140+
positions = getStartingPositionerValues(source_file, nxentry_name)
136141
column_names = "Name", "Value", "Units"
137142
return dict(zip(column_names, zip(*positions)))

0 commit comments

Comments
 (0)