normalize whitespace
This commit is contained in:
parent
ce94a1fc18
commit
94a0f2b94b
|
@ -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():
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue