mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 03:50:58 +00:00
python: convert chunks to bytes when reading from hid
This commit is contained in:
parent
05aabc64bb
commit
59f43514be
@ -90,7 +90,8 @@ class HidHandle:
|
|||||||
|
|
||||||
def read_chunk(self) -> bytes:
|
def read_chunk(self) -> bytes:
|
||||||
while True:
|
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:
|
if chunk:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user