diff options
author | rajiv <rajiv.kumar@nectechnologies.in> | 2015-02-12 16:38:12 +0530 |
---|---|---|
committer | Steve Martinelli <stevemar@ca.ibm.com> | 2015-11-26 00:14:09 -0500 |
commit | 1d17c70315a6f372b93f58973b10a3244a9a8b85 (patch) | |
tree | be6385562518c58d2fc597cc687296e83d55b050 /keystoneclient/session.py | |
parent | dc658842edb5bd448fbe841fd161fbc385e6e30a (diff) | |
download | python-keystoneclient-1d17c70315a6f372b93f58973b10a3244a9a8b85.tar.gz |
No keystone Endpoint now gives a valid Error Message
When no valid keystone endpoint exist, EndpointNotFound exception
is raised with an error message
Change-Id: I75b00cb73b18bc19261c061e0ae217ef251f8853
Closes-Bug: #1208991
Diffstat (limited to 'keystoneclient/session.py')
-rw-r--r-- | keystoneclient/session.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/keystoneclient/session.py b/keystoneclient/session.py index 9c86dc8..0376fc1 100644 --- a/keystoneclient/session.py +++ b/keystoneclient/session.py @@ -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('/')) |