Merge remote-tracking branch 'origin/master' into CURA-6447_fix_start_onboarding

This commit is contained in:
Lipu Fei 2019-04-10 09:08:05 +02:00
commit 9a33a301ab
5 changed files with 11 additions and 4 deletions

View file

@ -561,7 +561,13 @@ class Toolbox(QObject, Extension):
self._download_reply.downloadProgress.disconnect(self._onDownloadProgress)
except (TypeError, RuntimeError): # Raised when the method is not connected to the signal yet.
pass # Don't need to disconnect.
self._download_reply.abort()
try:
self._download_reply.abort()
except RuntimeError:
# In some cases the garbage collector is a bit to agressive, which causes the dowload_reply
# to be deleted (especially if the machine has been put to sleep). As we don't know what exactly causes
# this (The issue probably lives in the bowels of (py)Qt somewhere), we can only catch and ignore it.
pass
self._download_reply = None
self._download_request = None
self.setDownloadProgress(0)