raster.py: Py2 compat

This commit is contained in:
Philipp Klaus
2017-07-03 09:42:28 +02:00
parent 670068ce95
commit 2c8620f94e
+4 -1
View File
@@ -20,7 +20,10 @@ from .devicedependent import models, \
from . import BrotherQLError, BrotherQLUnsupportedCmd, BrotherQLUnknownModel, BrotherQLRasterError from . import BrotherQLError, BrotherQLUnsupportedCmd, BrotherQLUnknownModel, BrotherQLRasterError
from io import BytesIO try:
from io import BytesIO
except: # Py2
from cStringIO import StringIO as BytesIO
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)