summaryrefslogtreecommitdiff
path: root/openstackclient/common/utils.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2012-05-14 17:43:30 -0500
committerDean Troyer <dtroyer@gmail.com>2012-05-18 10:35:20 -0500
commit0c4e131c6ea6f6756e0d6cb2f5dd6e2a399d7829 (patch)
tree80ab32e9d5bd4ee5cdaab14d7273bea976178c34 /openstackclient/common/utils.py
parentf3dd77f30aedf6abb47a2790baaa68b07a06805c (diff)
downloadpython-openstackclient-0c4e131c6ea6f6756e0d6cb2f5dd6e2a399d7829.tar.gz
Add endpoint CRUD commands
* add {create|delete|list|show} endpoint commands Change-Id: Ife9fa789d5818d63288b09687b43d802b1b97858
Diffstat (limited to 'openstackclient/common/utils.py')
-rw-r--r--openstackclient/common/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py
index 475efeca..ea8170bc 100644
--- a/openstackclient/common/utils.py
+++ b/openstackclient/common/utils.py
@@ -52,7 +52,7 @@ def find_resource(manager, name_or_id):
# Eventually this should be pulled from a common set
# of client exceptions.
except Exception as ex:
- if '.NotFound' in type(ex).__name__:
+ if type(ex).__name__ == 'NotFound':
msg = "No %s with a name or ID of '%s' exists." % \
(manager.resource_class.__name__.lower(), name_or_id)
raise exceptions.CommandError(msg)