mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Added exception handling for disconnect issues on mac
CURA-1851
This commit is contained in:
parent
1dbd789d10
commit
99892ffd58
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue