From 0c4e131c6ea6f6756e0d6cb2f5dd6e2a399d7829 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 14 May 2012 17:43:30 -0500 Subject: Add endpoint CRUD commands * add {create|delete|list|show} endpoint commands Change-Id: Ife9fa789d5818d63288b09687b43d802b1b97858 --- openstackclient/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient/common/utils.py') 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) -- cgit v1.2.1