From 7da05e0f36137a88bf582f341508bbe5c45dd652 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 19 Sep 2016 13:38:52 +0200 Subject: [PATCH] Post reply is now set to None after abort CURA-2295 --- NetworkPrinterOutputDevice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index ddee244355..3d9a96d8ad 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -297,7 +297,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): if self._progress_message: self._progress_message.hide() - + # Check if we were uploading something. Abort if this is the case. # Some operating systems handle this themselves, others give weird issues. try: @@ -309,6 +309,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): pass # The disconnection can fail on mac in some cases. Ignore that. self._post_reply.abort() + self._post_reply = None except RuntimeError: self._post_reply = None # It can happen that the wrapped c++ object is already deleted. return @@ -339,6 +340,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): pass # The disconnection can fail on mac in some cases. Ignore that. self._post_reply.abort() + self._post_reply = None except RuntimeError: self._post_reply = None # It can happen that the wrapped c++ object is already deleted. self.setConnectionState(ConnectionState.error)