normalize whitespace

This commit is contained in:
Patrick Kanzler 2017-01-30 01:57:36 +01:00
parent ce94a1fc18
commit 94a0f2b94b
No known key found for this signature in database
GPG Key ID: F07F07153306FCEF
2 changed files with 4 additions and 4 deletions

View File

@ -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():

View File

@ -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