1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

omit Features message from debug dumps

This commit is contained in:
matejcik 2018-02-28 17:14:18 +01:00 committed by matejcik
parent db3767f7ef
commit 52c2319822

View File

@ -122,8 +122,9 @@ def format_protobuf(pb, indent=0, sep=' '*4):
def pprint(msg): def pprint(msg):
msg_class = msg.__class__.__name__ msg_class = msg.__class__.__name__
msg_size = msg.ByteSize() msg_size = msg.ByteSize()
if isinstance(msg, proto.FirmwareUpload) or isinstance(msg, proto.SelfTest): if isinstance(msg, proto.FirmwareUpload) or isinstance(msg, proto.SelfTest) \
return "<%s> (%d bytes):\n" % (msg_class, msg_size) or isinstance(msg, proto.Features):
return "<%s> (%d bytes)" % (msg_class, msg_size)
else: else:
return "<%s> (%d bytes):\n%s" % (msg_class, msg_size, format_protobuf(msg)) return "<%s> (%d bytes):\n%s" % (msg_class, msg_size, format_protobuf(msg))