print_and_feed: py3 fix

This commit is contained in:
Dmytro Katyukha 2017-02-09 10:03:35 +00:00
parent 40c200f28d
commit 8968e9463c

View File

@ -640,7 +640,7 @@ class Escpos(object):
""" """
if 0 <= n <= 255: if 0 <= n <= 255:
# ESC d n # ESC d n
self._raw(ESC + b"d" + six.binary_type(chr(n))) self._raw(ESC + b"d" + six.int2byte(n))
else: else:
raise ValueError("n must be betwen 0 and 255") raise ValueError("n must be betwen 0 and 255")