Skip to content

Commit

Permalink
ENH: avoid bare raise in an except clause
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed May 16, 2022
1 parent 457a0c1 commit 67c111a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def _generate_fields(self, fields_to_generate):
# supposed to be unitless
fd = self.ds.arr(fd, "")
if fi.units != "":
raise YTFieldUnitError(fi, fd.units)
raise YTFieldUnitError(fi, fd.units) from None
except UnitConversionError as e:
raise YTFieldUnitError(fi, fd.units) from e
except UnitParseError as e:
Expand Down

0 comments on commit 67c111a

Please sign in to comment.