[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user