|
|
|
@ -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"],
|
|
|
|
|