summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/hosts.py3
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