Commit 4c7172ae authored by hynek's avatar hynek 🤤
Browse files

fix(dhrep/token): remove handling of exception that cannot occur

parent 5ee16013
......@@ -23,7 +23,7 @@ class Token:
"""
def __init__(
self, access_token: str, token_type: str, expires_in: str, scope: str
self, access_token: str, token_type: str, expires_in: str, scope: str
) -> None:
self._access_token = access_token
self._token_type = token_type
......@@ -166,13 +166,9 @@ class TokenHelper:
except (TypeError, KeyError) as e:
logger.error(e)
raise InvalidTokenException(e)
except (ValueError) as e:
logger.error(e)
raise InvalidTokenException(token["access_token"])
else:
return t
@staticmethod
def to_dict(token: Token) -> Dict[str, str]:
return {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment