diff options
author | Andrey Kurilin <akurilin@mirantis.com> | 2014-05-19 13:48:29 +0300 |
---|---|---|
committer | Andrey Kurilin <akurilin@mirantis.com> | 2014-05-22 16:48:24 +0300 |
commit | 4e1ee661083bd672a884fd13fdb1ffaadea5252a (patch) | |
tree | 81e6baee232b3fe41879370abc917e2ec87224c6 /novaclient/base.py | |
parent | 73dcda4fceb2976f63352663b6733ec4faab91bc (diff) | |
download | python-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.py | 2 |
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: |