From 6b5122809085cfddeb90f07ff2d03eae46a16982 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 9 Mar 2018 14:24:36 +0100 Subject: [PATCH] use binascii.hexlify instead of bytearray.hex (which doesn't exist in python < 3.5) --- trezorlib/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trezorlib/client.py b/trezorlib/client.py index e22c392..9a601ad 100644 --- a/trezorlib/client.py +++ b/trezorlib/client.py @@ -113,7 +113,7 @@ def format_protobuf(pb, indent=0, sep=' ' * 4): lines.append(level + '}') return '\n'.join(lines) if isinstance(value, bytearray): - return 'bytearray(0x{})'.format(value.hex()) + return 'bytearray(0x{})'.format(binascii.hexlify(value).decode('ascii')) return repr(value)