1
0
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:
Patrick Kanzler
2016-01-08 03:43:33 +01:00
parent f25521f22f
commit 41c6afd3b8
4 changed files with 11 additions and 11 deletions

View File

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