1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

python: convert chunks to bytes when reading from hid

This commit is contained in:
matejcik 2020-05-04 10:16:15 +02:00
parent 05aabc64bb
commit 59f43514be

View File

@ -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: