mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Added error checking, added typing, renamed function. CURA-5389
This commit is contained in:
parent
af02dc2758
commit
2bd8350141
5 changed files with 27 additions and 13 deletions
|
@ -455,8 +455,14 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
self.setAuthenticationState(AuthState.AuthenticationDenied)
|
||||
self._authentication_failed_message.show()
|
||||
|
||||
def _saveAuthentication(self):
|
||||
def _saveAuthentication(self) -> None:
|
||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if self._authentication_key is None:
|
||||
Logger.log("e", "Authentication key is None, nothing to save.")
|
||||
return
|
||||
if self._authentication_id is None:
|
||||
Logger.log("e", "Authentication id is None, nothing to save.")
|
||||
return
|
||||
if global_container_stack:
|
||||
global_container_stack.setMetaDataEntry("network_authentication_key", self._authentication_key)
|
||||
|
||||
|
@ -631,4 +637,4 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||
result = "********" + result
|
||||
return result
|
||||
|
||||
return self._authentication_key
|
||||
return self._authentication_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue