Skip to content

Commit

Permalink
MNT #279 rely on finally clause
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Oct 31, 2023
1 parent 096c0cd commit 5ed1bb7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion hkl/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def write(self, diffractometer):
diffractometer.calc.wavelength = w1
r = diffractometer.calc.sample.add_reflection(*args)
except RuntimeError as exc:
diffractometer.calc.wavelength = w0
raise RuntimeError(f"could not add reflection({args}, wavelength={w1})") from exc
finally:
diffractometer.calc.wavelength = w0
Expand Down

0 comments on commit 5ed1bb7

Please sign in to comment.