mirror of
https://github.com/python-escpos/python-escpos
synced 2025-09-13 09:09:58 +00:00
REFACTOR replace % op with format were it is easy
This commit is contained in:
@@ -348,12 +348,12 @@ class Escpos(object):
|
||||
if 1 <= height <= 255:
|
||||
self._raw(BARCODE_HEIGHT + chr(height))
|
||||
else:
|
||||
raise BarcodeSizeError("height = %s" % height)
|
||||
raise BarcodeSizeError("height = {height}".format(height=height))
|
||||
# Width
|
||||
if 2 <= width <= 6:
|
||||
self._raw(BARCODE_WIDTH + chr(width))
|
||||
else:
|
||||
raise BarcodeSizeError("width = %s" % width)
|
||||
raise BarcodeSizeError("width = {width}".format(width=width))
|
||||
# Font
|
||||
if font.upper() == "B":
|
||||
self._raw(BARCODE_FONT_B)
|
||||
|
Reference in New Issue
Block a user