From d629a76689bbf7cbec6ab67a0b6d6b321a1d5cfd Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 3 Feb 2014 17:37:39 +0100 Subject: [PATCH] print message size in _pprint --- trezorlib/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 trezorlib/client.py diff --git a/trezorlib/client.py b/trezorlib/client.py old mode 100755 new mode 100644 index f176a67..3cd2c57 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -135,7 +135,8 @@ class TrezorClient(object): return ret def _pprint(self, msg): - return "<%s>:\n%s" % (msg.__class__.__name__, msg) + ser = msg.SerializeToString() + return "<%s> (%d bytes):\n%s" % (msg.__class__.__name__, len(ser), msg) def setup_debuglink(self, button=None, pin_correct=False): self.debug_button = button