Merge "No keystone Endpoint now gives a valid Error Message"

This commit is contained in:
Jenkins
2015-11-26 07:10:52 +00:00
committed by Gerrit Code Review

View File

@@ -326,7 +326,10 @@ class Session(object):
base_url = self.get_endpoint(auth, **endpoint_filter)
if not base_url:
raise exceptions.EndpointNotFound()
service_type = (endpoint_filter or {}).get('service_type',
'unknown')
msg = _('Endpoint for %s service') % service_type
raise exceptions.EndpointNotFound(msg)
url = '%s/%s' % (base_url.rstrip('/'), url.lstrip('/'))