summaryrefslogtreecommitdiff
path: root/novaclient/base.py
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2014-05-19 13:48:29 +0300
committerAndrey Kurilin <akurilin@mirantis.com>2014-05-22 16:48:24 +0300
commit4e1ee661083bd672a884fd13fdb1ffaadea5252a (patch)
tree81e6baee232b3fe41879370abc917e2ec87224c6 /novaclient/base.py
parent73dcda4fceb2976f63352663b6733ec4faab91bc (diff)
downloadpython-novaclient-4e1ee661083bd672a884fd13fdb1ffaadea5252a.tar.gz
Set default http-based exception as `HttpError`
Since exceptions from oslo is used, ClientException doesn't have any attributes related to HTTP, so `HttpError` should be set as default http-based exception. Also, attribute `code` is used in several project, so it should be returned and marked as deprecated. Partial-Bug: #1322183 Change-Id: I3c71e2d25d6e36b5bac0f2b3add74d6747cf7c25
Diffstat (limited to 'novaclient/base.py')
-rw-r--r--novaclient/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/novaclient/base.py b/novaclient/base.py
index 11a6d6f8..c54367c1 100644
--- a/novaclient/base.py
+++ b/novaclient/base.py
@@ -191,7 +191,7 @@ class ManagerWithFind(Manager):
num_matches = len(matches)
if num_matches == 0:
msg = "No %s matching %s." % (self.resource_class.__name__, kwargs)
- raise exceptions.NotFound(404, msg)
+ raise exceptions.NotFound(msg)
elif num_matches > 1:
raise exceptions.NoUniqueMatch
else: