Commit 2085ffb5 authored by Giorgos Korfiatis's avatar 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
......@@ -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))
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