From 99892ffd58f33a7da218157c1928d27073953f18 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 18 Aug 2016 13:23:29 +0200 Subject: [PATCH] Added exception handling for disconnect issues on mac CURA-1851 --- NetworkPrinterOutputDevice.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index 7b3c4760b7..c8ec7bd299 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -238,9 +238,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): # Some operating systems handle this themselves, others give weird issues. if self._post_reply: self._post_reply.abort() - self._post_reply.uploadProgress.disconnect(self._onUploadProgress) + try: + self._post_reply.uploadProgress.disconnect(self._onUploadProgress) + except TypeError: + pass # The disconnection can fail on mac in some cases. Ignore that. self._progress_message.hide() self.setConnectionState(ConnectionState.error) + return if self._authentication_state == AuthState.NotAuthenticated: self._verifyAuthentication() # We don't know if we are authenticated; check if we have correct auth.