mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fix mypy typing issue
This commit is contained in:
parent
4adbfd467e
commit
853ccbdb71
1 changed files with 5 additions and 1 deletions
|
@ -140,7 +140,7 @@ class AuthorizationService:
|
|||
# Load authentication data from preferences.
|
||||
def loadAuthDataFromPreferences(self) -> None:
|
||||
if self._preferences is None:
|
||||
Logger.logException("e", "Unable to load authentication data, since no preference has been set!")
|
||||
Logger.log("e", "Unable to load authentication data, since no preference has been set!")
|
||||
return
|
||||
try:
|
||||
preferences_data = json.loads(self._preferences.getValue(self._settings.AUTH_DATA_PREFERENCE_KEY))
|
||||
|
@ -152,6 +152,10 @@ class AuthorizationService:
|
|||
|
||||
# Store authentication data in preferences.
|
||||
def _storeAuthData(self, auth_data: Optional[AuthenticationResponse] = None) -> None:
|
||||
if self._preferences is None:
|
||||
Logger.log("e", "Unable to save authentication data, since no preference has been set!")
|
||||
return
|
||||
|
||||
self._auth_data = auth_data
|
||||
if auth_data:
|
||||
self._user_profile = self.getUserProfile()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue