Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Discuss Data Project
Discuss Data
Commits
4c7172ae
Commit
4c7172ae
authored
Jun 02, 2020
by
hynek
🤤
Browse files
fix(dhrep/token): remove handling of exception that cannot occur
parent
5ee16013
Changes
1
Hide whitespace changes
Inline
Side-by-side
discuss_data/dhrep/token.py
View file @
4c7172ae
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment