|
|
|
@ -214,6 +214,9 @@ class Bureau(object):
|
|
|
|
|
try:
|
|
|
|
|
printcfg.read("printers.cfg")
|
|
|
|
|
self.smprint = {}
|
|
|
|
|
if "ipaddr" in printcfg["smallprinter"]:
|
|
|
|
|
self.smprint["ipaddr"] = printcfg["smallprinter"]["ipaddr"]
|
|
|
|
|
|
|
|
|
|
for hexkey in ["vendorid", "productid", "inep", "outep"]:
|
|
|
|
|
val = printcfg["smallprinter"][hexkey]
|
|
|
|
|
if val == "":
|
|
|
|
@ -426,7 +429,9 @@ class Bureau(object):
|
|
|
|
|
"""
|
|
|
|
|
self._sm_print_lockfile = open("small_printer_lock", "w")
|
|
|
|
|
fcntl.lockf(self._sm_print_lockfile, fcntl.LOCK_EX)
|
|
|
|
|
if (self.smprint["inep"] is None) and (self.smprint["outep"] is None):
|
|
|
|
|
if "ipaddr" in self.smprint:
|
|
|
|
|
prn = printer.Network(self.smprint["ipaddr"])
|
|
|
|
|
elif (self.smprint["inep"] is None) and (self.smprint["outep"] is None):
|
|
|
|
|
prn = printer.Usb(self.smprint["vendorid"],
|
|
|
|
|
self.smprint["productid"])
|
|
|
|
|
else:
|
|
|
|
|