Skip to content

Commit 31c37c2

Browse files
authored
Fix sting encoding issues
1 parent 371e27f commit 31c37c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

openxc/sources/usb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ def _read(self, endpoint_address, timeout=None,
8282
read_size=DEFAULT_READ_REQUEST_SIZE):
8383
timeout = timeout or self.DEFAULT_READ_TIMEOUT
8484
try:
85-
return self.device.read(0x80 + endpoint_address,
85+
str(return self.device.read(0x80 + endpoint_address,
8686
read_size, self.DEFAULT_INTERFACE_NUMBER, timeout
87-
).tostring()
87+
),'utf-8')
8888
except (usb.core.USBError, AttributeError) as e:
8989
if e.errno == 110:
9090
# Timeout, it may just not be sending

0 commit comments

Comments
 (0)