From 59f43514be9c577393e316709dc10b111cdf5834 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 4 May 2020 10:16:15 +0200 Subject: [PATCH] python: convert chunks to bytes when reading from hid --- python/src/trezorlib/transport/hid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/src/trezorlib/transport/hid.py b/python/src/trezorlib/transport/hid.py index aab512b2f..97865f3e5 100644 --- a/python/src/trezorlib/transport/hid.py +++ b/python/src/trezorlib/transport/hid.py @@ -90,7 +90,8 @@ class HidHandle: def read_chunk(self) -> bytes: while True: - chunk = self.handle.read(64) + # hidapi seems to return lists of ints instead of bytes + chunk = bytes(self.handle.read(64)) if chunk: break else: