1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-10 15:30:55 +00:00

don't pprint FirmwareUpload message

This commit is contained in:
Pavol Rusnak 2014-02-21 19:13:14 +01:00
parent 729fac2077
commit f2cb352ac3

View File

@ -17,7 +17,10 @@ def get_buttonrequest_value(code):
return [ k for k, v in types.ButtonRequestType.items() if v == code][0]
def pprint(msg):
return "<%s> (%d bytes):\n%s" % (msg.__class__.__name__, msg.ByteSize(), msg)
if isinstance(msg, proto.FirmwareUpload):
return "<%s> (%d bytes):\n" % (msg.__class__.__name__, msg.ByteSize())
else:
return "<%s> (%d bytes):\n%s" % (msg.__class__.__name__, msg.ByteSize(), msg)
class CallException(Exception):
def __init__(self, code, message):