minor fix

This commit is contained in:
Wilson Gomez 2023-01-05 11:40:55 -05:00
parent 0df77c4ca6
commit b878e841ee
1 changed files with 5 additions and 5 deletions

View File

@ -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: