summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-12-10 18:37:17 +0000
committerGerrit Code Review <review@openstack.org>2015-12-10 18:37:18 +0000
commit823ba770e0baafa707c89723c576db060b1b4742 (patch)
tree9f8a4935e947eccbda765e4d125337322894a8e8 /openstackclient
parentf2339e94b06112af4749e60280d4ab448812a7dc (diff)
parentb98aee57c10917d5f57f2ed3cfae3ce67e33496c (diff)
downloadpython-openstackclient-823ba770e0baafa707c89723c576db060b1b4742.tar.gz
Merge "Fix "sevice show" cannot catch NoUniqueMatch Exception"
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/openstackclient/identity/common.py b/openstackclient/identity/common.py
index d0edb0bd..2afa41fb 100644
--- a/openstackclient/identity/common.py
+++ b/openstackclient/identity/common.py
@@ -41,6 +41,11 @@ def find_service(identity_client, name_type_or_id):
msg = ("No service with a type, name or ID of '%s' exists."
% name_type_or_id)
raise exceptions.CommandError(msg)
+ except identity_exc.NoUniqueMatch:
+ msg = ("Multiple service matches found for '%s', "
+ "use an ID to be more specific."
+ % name_type_or_id)
+ raise exceptions.CommandError(msg)
def _get_domain_id_if_requested(identity_client, domain_name_or_id):