mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
Add try-excepts for signal disconnections
This commit is contained in:
parent
ba12d9dff8
commit
e9462b17c8
@ -1176,8 +1176,14 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
# Remove cached post request items.
|
# Remove cached post request items.
|
||||||
del self._material_post_objects[id(reply)]
|
del self._material_post_objects[id(reply)]
|
||||||
elif "print_job" in reply_url:
|
elif "print_job" in reply_url:
|
||||||
|
try:
|
||||||
reply.uploadProgress.disconnect(self._onUploadProgress)
|
reply.uploadProgress.disconnect(self._onUploadProgress)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
reply.finished.disconnect(self._onUploadFinished)
|
reply.finished.disconnect(self._onUploadFinished)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
Logger.log("d", "Uploading of print succeeded after %s", time() - self._send_gcode_start)
|
Logger.log("d", "Uploading of print succeeded after %s", time() - self._send_gcode_start)
|
||||||
# Only reset the _post_reply if it was the same one.
|
# Only reset the _post_reply if it was the same one.
|
||||||
if reply == self._post_reply:
|
if reply == self._post_reply:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user