python: convert chunks to bytes when reading from hid

pull/995/head
matejcik 4 years ago
parent 05aabc64bb
commit 59f43514be

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

Loading…
Cancel
Save