diff --git a/app/reporting.py b/app/reporting.py index 26b565f..48b94d6 100755 --- a/app/reporting.py +++ b/app/reporting.py @@ -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: