diff options
| author | daisy-ycguo <daisy.ycguo@gmail.com> | 2012-06-14 10:32:21 +0800 |
|---|---|---|
| committer | daisy-ycguo <daisy.ycguo@gmail.com> | 2012-06-14 10:32:21 +0800 |
| commit | 9ce657702cbc4312669f364e68b0c1faefd0f0af (patch) | |
| tree | 4304fbaa972d9dccf46bbab09bb503174d6011c0 /nova/api | |
| parent | cd085d0ce74fc478c04f1f61c0e5c22d7aa6d208 (diff) | |
| download | nova-9ce657702cbc4312669f364e68b0c1faefd0f0af.tar.gz nova-9ce657702cbc4312669f364e68b0c1faefd0f0af.tar.xz nova-9ce657702cbc4312669f364e68b0c1faefd0f0af.zip | |
bug #996880 change HostNotFound in hosts to HTTPNotFound
Change-Id: Ib8b7f1f26c2370e2a82b491d8774797985c0ae98
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/hosts.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py index e9d342c53..6cdca56c8 100644 --- a/nova/api/openstack/compute/contrib/hosts.py +++ b/nova/api/openstack/compute/contrib/hosts.py @@ -114,7 +114,8 @@ def check_host(fn): if id in hosts: return fn(self, req, id, *args, **kwargs) else: - raise exception.HostNotFound(host=id) + message = _("Host '%s' could not be found.") % id + raise webob.exc.HTTPNotFound(explanation=message) return wrapped |
