Skip to content

Commit

Permalink
catch NeXusError
Browse files Browse the repository at this point in the history
in the >1.0 nexusformat version a NeXusError instead if a KeyError is
thrown when a path is not available
  • Loading branch information
Daniel Schick committed Aug 9, 2023
1 parent d8c7826 commit 2038cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyEvalData/io/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def save_all_scans_to_nexus(self):
try:
_ = nxs_file[entry_name]
scan_in_nexus = True
except KeyError:
except (KeyError, nxs.NeXusError):
scan_in_nexus = False

if (not scan_in_nexus) or (scan.number >= last_scan_in_nexus) \
Expand Down

0 comments on commit 2038cb1

Please sign in to comment.