Skip to content

Commit

Permalink
Show message when getting new token fails (#1083)
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaminister authored Dec 6, 2022
1 parent 31cc23d commit 3a60143
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/lib/tokenresolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ def _get_new_token(self, name, variant=None, redirect_url=None, roaming=False):
}
response = open_url(redirect_url, headers=headers, follow_redirects=False)

response = open_url(response.info().get('Location'), headers=headers, follow_redirects=False)
next_location = response.info().get('Location')
if not next_location:
ok_dialog(heading=localize(30970), message=localize(30971))
return None

response = open_url(next_location, headers=headers, follow_redirects=False)

if response:
tokens = self._extract_tokens(response)
Expand Down

0 comments on commit 3a60143

Please sign in to comment.