Skip to content
Snippets Groups Projects
Commit d146ef65 authored by Martin Trigaux's avatar Martin Trigaux Committed by fw-bot
Browse files

[FIX] hw_blackbox_be: python3 support


Was comparing b'0x02' and '0x02'

closes odoo/odoo#39214

X-original-commit: 838cb0e8
Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 5efa30c3
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ class Blackbox(Thread):
etx = ser.read(1)
bcc = ser.read(1)
if stx == chr(0x02) and etx == chr(0x03) and bcc and self._lrc(response) == ord(bcc):
if stx == chr(0x02).encode() and etx == chr(0x03).encode() and bcc and self._lrc(response.decode()) == ord(bcc):
got_response = True
ser.write(chr(0x06).encode())
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment