Fix for string operation
* With Python version 3 data and text are treated different. Convert the * text accordingly.
This commit is contained in:
parent
afc6834082
commit
b99c076bae
|
@ -159,7 +159,10 @@ class File(Escpos):
|
|||
|
||||
def _raw(self, msg):
|
||||
""" Print any command sent in raw format """
|
||||
self.device.write(msg);
|
||||
if type(msg) is str:
|
||||
self.device.write(msg.encode());
|
||||
else:
|
||||
self.device.write(msg);
|
||||
|
||||
|
||||
def __del__(self):
|
||||
|
|
Loading…
Reference in New Issue