Skip to content

Commit b98aee5

Browse files
author
Min Min Ren
committed
Fix "sevice show" cannot catch NoUniqueMatch Exception
Fix a bug for "service show" subcommand cannot cache NoUniqueMatch Exception Change-Id: I393c5417de0fef424618b08119ddbc8fea27e114 Closes-Bug: #1524305
1 parent b60a949 commit b98aee5

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)