Skip to content

Commit

Permalink
avoid raising exceptions in DataType.__str__()
Browse files Browse the repository at this point in the history
thanks to [at]kayoub5 for pointing this out.

Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Gerrit Ecke <[email protected]>
  • Loading branch information
andlaus committed Sep 25, 2024
1 parent 2344851 commit b9b0c55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions odxtools/odxtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,4 @@ def __str__(self) -> str:
elif self in (DataType.A_UNICODE2STRING, DataType.A_ASCIISTRING, DataType.A_UTF8STRING):
return "string"
else:
odxraise(f"Type info for type {self.value}", NotImplementedError)
return "<unknown type>"
return f"<unknown type '{self.value}'>"

0 comments on commit b9b0c55

Please sign in to comment.