Py2 compat of brother_ql.reader - fixes #35
This commit is contained in:
1 parent
3944efad85
commit
fd2206891b
1 file changed
+2
-1
@@ -47,7 +47,7 @@ RESP_ERROR_INFORMATION_1_DEF = {
|
|||||||
4: 'Main unit in use (QL-560/650TD/1050)',
|
4: 'Main unit in use (QL-560/650TD/1050)',
|
||||||
5: 'Printer turned off',
|
5: 'Printer turned off',
|
||||||
6: 'High-voltage adapter (not used)',
|
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 = {
|
RESP_ERROR_INFORMATION_2_DEF = {
|
||||||
@@ -152,6 +152,7 @@ def match_opcode(data):
|
|||||||
return matching_opcodes[0]
|
return matching_opcodes[0]
|
||||||
|
|
||||||
def interpret_response(data):
|
def interpret_response(data):
|
||||||
|
data = bytes(data)
|
||||||
assert len(data) >= 32
|
assert len(data) >= 32
|
||||||
assert data.startswith(b'\x80\x20\x42')
|
assert data.startswith(b'\x80\x20\x42')
|
||||||
for i, byte_name in enumerate(RESP_BYTE_NAMES):
|
for i, byte_name in enumerate(RESP_BYTE_NAMES):
|
||||||
|
|||||||
Reference in new issue
Block a user