minor fix
This commit is contained in:
parent
0df77c4ca6
commit
b878e841ee
|
@ -142,7 +142,7 @@ class Receipt(object):
|
|||
try:
|
||||
host, port = self._device.split(":")
|
||||
except:
|
||||
host, port = self.device, None
|
||||
host, port = self._device, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
else:
|
||||
|
@ -187,7 +187,7 @@ class Receipt(object):
|
|||
try:
|
||||
host, port = self._device.split(":")
|
||||
except:
|
||||
host, port = self.device, None
|
||||
host, port = self._device, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
else:
|
||||
|
@ -219,7 +219,7 @@ class Receipt(object):
|
|||
try:
|
||||
host, port = self._device.split(":")
|
||||
except:
|
||||
host, port = self.device, None
|
||||
host, port = self._device, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
else:
|
||||
|
@ -794,9 +794,9 @@ class Receipt(object):
|
|||
self._printer.open()
|
||||
elif order['interface'] == 'network':
|
||||
try:
|
||||
host, port = self._device.split(":")
|
||||
host, port = host.split(":")
|
||||
except:
|
||||
host, port = self.device, None
|
||||
host, port = host, None
|
||||
if port:
|
||||
self._printer = printer.Network(host, port=int(port), timeout=15)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue