From aa19f9d737c5568ad5df71c188e5d14d56d349cc Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 8 Aug 2019 16:07:48 +0200 Subject: [PATCH] python: show enum number in debug outputs --- python/src/trezorlib/protobuf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/src/trezorlib/protobuf.py b/python/src/trezorlib/protobuf.py index 1fd6699f3..401e27d7d 100644 --- a/python/src/trezorlib/protobuf.py +++ b/python/src/trezorlib/protobuf.py @@ -415,7 +415,7 @@ def format_message( if isinstance(value, int): ftype = get_type(name) if isinstance(ftype, EnumType): - return ftype.to_str(value) + return "{} ({})".format(ftype.to_str(value), value) return repr(value)