From ec4e85b008b0edf4990fc25241b8a5053246afa6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 26 Sep 2016 17:32:54 +0200 Subject: [PATCH] fix v2 protocol --- trezorlib/transport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trezorlib/transport.py b/trezorlib/transport.py index 4e08b42a6..19d8aabf6 100644 --- a/trezorlib/transport.py +++ b/trezorlib/transport.py @@ -247,12 +247,12 @@ class TransportV2(Transport): return session_id def _session_begin(self): - self._write_chunk(b'O' + b'\0' * 63) + self._write_chunk(bytearray(b'O' + b'\0' * 63)) self.session_id = self.parse_session_open(self._read_chunk()) def _session_end(self): header = struct.pack(">L", self.session_id) - self._write_chunk(b'C' + header + b'\0' * (63 - len(header))) + self._write_chunk(bytearray(b'C' + header + b'\0' * (63 - len(header)))) if self._read_chunk()[0] != ord('C'): raise Exception("Expected session close") self.session_id = None