Skip to content

Commit

Permalink
Clean exception handling in unit_name implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
privet-kitty committed Jul 27, 2024
1 parent 802f025 commit f4c68bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ezdxf/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def unit_name(enum: int) -> str:
"""Returns the name of the unit enum."""
try:
return InsertUnits(enum).name
except (ValueError, IndexError):
except ValueError:
return "unitless"


Expand Down

0 comments on commit f4c68bb

Please sign in to comment.