Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-11-22 16:44:52 +0300
committerGhostkeeper <rubend@tutanota.com>2021-11-22 16:44:52 +0300
commit8ea8cc752fe3addb9e0eb8a13ec205e8d3a51c0a (patch)
tree48ea8d255dde994b758a760a9f3363372c9e8029 /cura
parente8f9e92f02a25994307c785b1cbe0f1cdc313856 (diff)
Also call processing functions for error callbacks
Otherwise the appropriate callbacks might not get called. Contributes to issue CURA-8539.
Diffstat (limited to 'cura')
-rw-r--r--cura/OAuth2/AuthorizationHelpers.py3
-rw-r--r--cura/OAuth2/AuthorizationService.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/cura/OAuth2/AuthorizationHelpers.py b/cura/OAuth2/AuthorizationHelpers.py
index 28b07cf17c..ac16ea9c9f 100644
--- a/cura/OAuth2/AuthorizationHelpers.py
+++ b/cura/OAuth2/AuthorizationHelpers.py
@@ -73,7 +73,8 @@ class AuthorizationHelpers:
self._token_url,
data = urllib.parse.urlencode(data).encode("UTF-8"),
headers_dict = headers,
- callback = lambda response: self.parseTokenResponse(response, callback)
+ callback = lambda response: self.parseTokenResponse(response, callback),
+ error_callback = lambda response: self.parseTokenResponse(response, callback)
)
def parseTokenResponse(self, token_response: QNetworkReply, callback: Callable[[AuthenticationResponse], None]) -> None:
diff --git a/cura/OAuth2/AuthorizationService.py b/cura/OAuth2/AuthorizationService.py
index 290fc5c651..98c09c6873 100644
--- a/cura/OAuth2/AuthorizationService.py
+++ b/cura/OAuth2/AuthorizationService.py
@@ -134,7 +134,7 @@ class AuthorizationService:
self._auth_helpers.getAccessTokenUsingRefreshToken(self._auth_data.refresh_token, process_auth_data)
- self._auth_helpers.checkToken(self._auth_data.access_token, check_user_profile, lambda: callback(None))
+ self._auth_helpers.checkToken(self._auth_data.access_token, check_user_profile, lambda: check_user_profile(None))
def getAccessToken(self) -> Optional[str]:
"""Get the access token as provided by the response data."""