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
2085ffb5
Commit
2085ffb5
authored
Oct 18, 2013
by
Giorgos Korfiatis
Browse files
astakos: Consider no base url in service register
Check whether component's base_url is None before assuming a string.
parent
13419268
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/register.py
View file @
2085ffb5
...
...
@@ -125,7 +125,8 @@ def add_endpoint(component, service, endpoint_dict, out=None):
endpoint
=
Endpoint
.
objects
.
create
(
service
=
service
)
for
key
,
value
in
endpoint_dict
.
iteritems
():
base_url
=
component
.
base_url
if
key
==
"publicURL"
and
not
value
.
startswith
(
base_url
):
if
key
==
"publicURL"
and
(
base_url
is
None
or
not
value
.
startswith
(
base_url
)):
warn
=
out
.
write
if
out
is
not
None
else
logger
.
warning
warn
(
"Warning: Endpoint URL '%s' does not start with "
"assumed component base URL '%s'.
\n
"
%
(
value
,
base_url
))
...
...
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