mirror of
https://github.com/python-escpos/python-escpos
synced 2025-12-02 09:43:30 +00:00
REFACTOR replace % op with format were it is easy
This commit is contained in:
@@ -46,7 +46,7 @@ class BarcodeTypeError(Error):
|
||||
self.resultcode = 10
|
||||
|
||||
def __str__(self):
|
||||
return "No Barcode type is defined (%s)" % self.msg
|
||||
return "No Barcode type is defined ({msg})".format(msg=self.msg)
|
||||
|
||||
|
||||
class BarcodeSizeError(Error):
|
||||
@@ -62,7 +62,7 @@ class BarcodeSizeError(Error):
|
||||
self.resultcode = 20
|
||||
|
||||
def __str__(self):
|
||||
return "Barcode size is out of range (%s)" % self.msg
|
||||
return "Barcode size is out of range ({msg})".format(msg=self.msg)
|
||||
|
||||
|
||||
class BarcodeCodeError(Error):
|
||||
|
||||
Reference in New Issue
Block a user