add network receipt printer support

workspace
Brendan Howell 3 years ago
parent 34db8754c8
commit 74795fd9be

@ -90,7 +90,9 @@ class LogPrinter(logging.Handler):
def emit(self, record):
sm_print_lockfile = open("small_printer_lock", "w")
fcntl.lockf(sm_print_lockfile, fcntl.LOCK_EX)
if (self.printer["inep"] is None) and (self.printer["outep"] is None):
if "ipaddr" in self.printer:
prn = printer.Network(self.smprint["ipaddr"])
elif (self.printer["inep"] is None) and (self.printer["outep"] is None):
prn = printer.Usb(self.printer["vendorid"], self.printer["productid"])
else:
prn = printer.Usb(self.printer["vendorid"],

Loading…
Cancel
Save