mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-05 14:22:33 +00:00
python: show enum number in debug outputs
This commit is contained in:
parent
3255e8a16a
commit
aa19f9d737
@ -415,7 +415,7 @@ def format_message(
|
|||||||
if isinstance(value, int):
|
if isinstance(value, int):
|
||||||
ftype = get_type(name)
|
ftype = get_type(name)
|
||||||
if isinstance(ftype, EnumType):
|
if isinstance(ftype, EnumType):
|
||||||
return ftype.to_str(value)
|
return "{} ({})".format(ftype.to_str(value), value)
|
||||||
|
|
||||||
return repr(value)
|
return repr(value)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user