Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
5733a529
Commit
5733a529
authored
Dec 16, 2013
by
Ilias Tsitsimpis
Browse files
astakosclient: Pep8 fixes
parent
2d161610
Changes
1
Hide whitespace changes
Inline
Side-by-side
astakosclient/astakosclient/__init__.py
View file @
5733a529
...
...
@@ -511,7 +511,7 @@ class AstakosClient(object):
# --------------------------------------
# do a GET to ``API_TOKENS`` with a token
def
validate_token
(
self
,
token_id
,
belongs
T
o
=
None
):
def
validate_token
(
self
,
token_id
,
belongs
_t
o
=
None
):
""" Validate a temporary access token (oath2)
Keyword arguments:
...
...
@@ -520,15 +520,15 @@ class AstakosClient(object):
It returns back the token as well as information about the token
holder.
The belongs
T
o is optional and if it is given it must be inside the
The belongs
_t
o is optional and if it is given it must be inside the
token's scope.
In case of error raise an AstakosClientException.
"""
path
=
join_urls
(
self
.
api_tokens
,
str
(
token_id
))
if
belongs
T
o
is
not
None
:
params
=
{
'belongsTo'
:
belongs
T
o
}
if
belongs
_t
o
is
not
None
:
params
=
{
'belongsTo'
:
belongs
_t
o
}
path
=
'%s?%s'
%
(
path
,
urllib
.
urlencode
(
params
))
return
self
.
_call_astakos
(
path
,
method
=
"GET"
,
log_body
=
False
)
...
...
@@ -996,7 +996,7 @@ def parse_endpoints(endpoints, ep_name=None, ep_type=None,
else
:
return
catalog
except
KeyError
:
raise
NoEndpoints
()
raise
NoEndpoints
(
ep_name
,
ep_type
,
ep_region
,
ep_version_id
)
# --------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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