[FIX] hw_blackbox_be: python3 support

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

closes odoo/odoo#39214

X-original-commit: 838cb0e8c10de4229c8b04592aefa1808771bbb3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Martin Trigaux
2019-10-22 18:19:39 +00:00
committed by fw-bot
parent 5efa30c302
commit d146ef6507
+1 -1
View File
@@ -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: