diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 7db7950..48c06d7 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -98,7 +98,7 @@ class Escpos(object): # GS v 0, raster format bit image density_byte = (0 if high_density_horizontal else 1) + (0 if high_density_vertical else 2) header = GS + b"v0" + six.int2byte(density_byte) + self._int_low_high(im.width_bytes, 2) +\ - self._int_low_high(im.height, 2) + self._int_low_high(im.height, 2) self._raw(header + im.to_raster_format()) if impl == "graphics": @@ -328,7 +328,7 @@ class Escpos(object): function_type = 'B' else: raise BarcodeTypeError(( - "Barcode type '{bc} is not valid").format(bc=bc)) + "Barcode type '{bc} is not valid").format(bc=bc)) bc_types = BARCODE_TYPES[function_type.upper()] if bc.upper() not in bc_types.keys(): diff --git a/src/escpos/magicencode.py b/src/escpos/magicencode.py index 554f293..8842c75 100644 --- a/src/escpos/magicencode.py +++ b/src/escpos/magicencode.py @@ -62,8 +62,8 @@ class Encoder(object): encoding = CodePages.get_encoding_name(encoding) if not encoding in self.codepages: raise ValueError(( - 'Encoding "{}" cannot be used for the current profile. ' - 'Valid encodings are: {}' + 'Encoding "{}" cannot be used for the current profile. ' + 'Valid encodings are: {}' ).format(encoding, ','.join(self.codepages.keys()))) return encoding