Skip to content

Commit 823ba77

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Fix "sevice show" cannot catch NoUniqueMatch Exception"
2 parents f2339e9 + b98aee5 commit 823ba77

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

openstackclient/identity/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ def find_service(identity_client, name_type_or_id):
4141
msg = ("No service with a type, name or ID of '%s' exists."
4242
% name_type_or_id)
4343
raise exceptions.CommandError(msg)
44+
except identity_exc.NoUniqueMatch:
45+
msg = ("Multiple service matches found for '%s', "
46+
"use an ID to be more specific."
47+
% name_type_or_id)
48+
raise exceptions.CommandError(msg)
4449

4550

4651
def _get_domain_id_if_requested(identity_client, domain_name_or_id):

0 commit comments

Comments
 (0)