minor fix print command printer shared
This commit is contained in:
parent
cc45113812
commit
0df77c4ca6
|
@ -793,7 +793,14 @@ class Receipt(object):
|
|||
self._printer = printer.Win32Raw(host)
|
||||
self._printer.open()
|
||||
elif order['interface'] == 'network':
|
||||
self._printer = printer.Network(host, timeout=15)
|
||||
try:
|
||||
host, port = self._device.split(":")
|
||||
except:
|
||||
host, port = self.device, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
else:
|
||||
self._printer = printer.Network(host, timeout=15)
|
||||
elif order['interface'] == 'ssh':
|
||||
self._printer = FileSSH(*host.split('@'))
|
||||
if self._printer:
|
||||
|
|
Loading…
Reference in New Issue