Replace wrong exception in cups
This commit is contained in:
parent
a97502fe45
commit
5b6be2bb2d
@ -172,9 +172,9 @@ class CupsPrinter(Escpos):
|
||||
self.pending_job = True
|
||||
try:
|
||||
self.tmpfile.write(msg)
|
||||
except ValueError:
|
||||
except TypeError:
|
||||
self.pending_job = False
|
||||
raise ValueError("Printer job not opened")
|
||||
raise TypeError("Bytes required. Printer job not opened")
|
||||
|
||||
def send(self):
|
||||
"""Send the print job to the printer."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user