Skip to content

Commit

Permalink
Py2 compat of brother_ql.reader - fixes pklaus#35
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaus committed Aug 8, 2018
1 parent 3944efa commit fd22068
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion brother_ql/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
4: 'Main unit in use (QL-560/650TD/1050)',
5: 'Printer turned off',
6: 'High-voltage adapter (not used)',
7: 'Fan doesnt work (QL-1050/1060N)',
7: 'Fan doesn\'t work (QL-1050/1060N)',
}

RESP_ERROR_INFORMATION_2_DEF = {
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit fd22068

Please sign in to comment.