use unicode_literals everywhere

This commit is contained in:
Patrick Kanzler 2016-03-03 04:42:27 +01:00
parent c9ea90cd82
commit 6b56de67a7
2 changed files with 3 additions and 6 deletions

View File

@ -23,7 +23,7 @@ Result/Exit codes:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
#from __future__ import unicode_literals
from __future__ import unicode_literals
class Error(Exception):

View File

@ -10,7 +10,7 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
#from __future__ import unicode_literals
from __future__ import unicode_literals
import usb.core
import usb.util
@ -252,9 +252,6 @@ class File(Escpos):
:param msg: arbitrary code to be printed
:type msg: bytes
"""
if type(msg) is str:
self.device.write(msg.encode())
else:
self.device.write(msg)
def __del__(self):