mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -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.
|
# Load authentication data from preferences.
|
||||||
def loadAuthDataFromPreferences(self) -> None:
|
def loadAuthDataFromPreferences(self) -> None:
|
||||||
if self._preferences is 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
|
return
|
||||||
try:
|
try:
|
||||||
preferences_data = json.loads(self._preferences.getValue(self._settings.AUTH_DATA_PREFERENCE_KEY))
|
preferences_data = json.loads(self._preferences.getValue(self._settings.AUTH_DATA_PREFERENCE_KEY))
|
||||||
|
@ -152,6 +152,10 @@ class AuthorizationService:
|
||||||
|
|
||||||
# Store authentication data in preferences.
|
# Store authentication data in preferences.
|
||||||
def _storeAuthData(self, auth_data: Optional[AuthenticationResponse] = None) -> None:
|
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
|
self._auth_data = auth_data
|
||||||
if auth_data:
|
if auth_data:
|
||||||
self._user_profile = self.getUserProfile()
|
self._user_profile = self.getUserProfile()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue