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
|
self.pending_job = True
|
||||||
try:
|
try:
|
||||||
self.tmpfile.write(msg)
|
self.tmpfile.write(msg)
|
||||||
except ValueError:
|
except TypeError:
|
||||||
self.pending_job = False
|
self.pending_job = False
|
||||||
raise ValueError("Printer job not opened")
|
raise TypeError("Bytes required. Printer job not opened")
|
||||||
|
|
||||||
def send(self):
|
def send(self):
|
||||||
"""Send the print job to the printer."""
|
"""Send the print job to the printer."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user