mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 21:15:52 +08:00
Added exception handling for disconnect issues on mac
CURA-1851
This commit is contained in:
parent
1dbd789d10
commit
99892ffd58
@ -238,9 +238,13 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
# Some operating systems handle this themselves, others give weird issues.
|
# Some operating systems handle this themselves, others give weird issues.
|
||||||
if self._post_reply:
|
if self._post_reply:
|
||||||
self._post_reply.abort()
|
self._post_reply.abort()
|
||||||
|
try:
|
||||||
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)
|
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._progress_message.hide()
|
||||||
self.setConnectionState(ConnectionState.error)
|
self.setConnectionState(ConnectionState.error)
|
||||||
|
return
|
||||||
|
|
||||||
if self._authentication_state == AuthState.NotAuthenticated:
|
if self._authentication_state == AuthState.NotAuthenticated:
|
||||||
self._verifyAuthentication() # We don't know if we are authenticated; check if we have correct auth.
|
self._verifyAuthentication() # We don't know if we are authenticated; check if we have correct auth.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user