Py2 compat of brother_ql.reader - fixes #35

This commit is contained in:
Philipp Klaus committed 2018-08-08 19:39:37 +02:00
1 parent 3944efad85
commit fd2206891b
1 file changed
+2 -1
+2 -1
View File
@@ -47,7 +47,7 @@ RESP_ERROR_INFORMATION_1_DEF = {
4: 'Main unit in use (QL-560/650TD/1050)',
5: 'Printer turned off',
6: 'High-voltage adapter (not used)',
7: 'Fan doesn’t work (QL-1050/1060N)',
7: 'Fan doesn\'t work (QL-1050/1060N)',
}
RESP_ERROR_INFORMATION_2_DEF = {
@@ -152,6 +152,7 @@ def match_opcode(data):
return matching_opcodes[0]
def interpret_response(data):
data = bytes(data)
assert len(data) >= 32
assert data.startswith(b'\x80\x20\x42')
for i, byte_name in enumerate(RESP_BYTE_NAMES):