summaryrefslogtreecommitdiff
path: root/nova/api/openstack/compute/contrib/multinic.py
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2014-02-27 19:02:34 +0900
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2014-02-27 19:34:17 +0900
commit16e360d3a9183e9fd2b3dc163fe3e1ce4ec18e8b (patch)
tree93955fcf6b40830cb1b23dde72f02ec5b7741020 /nova/api/openstack/compute/contrib/multinic.py
parent2cd567d6cae816a6a8f4c78c4ec7d40823d7e445 (diff)
downloadnova-16e360d3a9183e9fd2b3dc163fe3e1ce4ec18e8b.tar.gz
Fix the explanations of HTTPNotFound response
Nova wsgi framework gets "explanation" from HTTPNotFound exception and outputs it into a response body as "message" attribute. Now some error explanations are passed to HTTPNotFound exception without explanation argument and they are not output to a response body. As the result, the default message "The resource could not be found." of wsgi library are output to a response body instead. This patch fixes them to output right message to a response body. Change-Id: I80d3a2da6258e94c485ce024eb310a63bcf39773 Closes-Bug: #1285437
Diffstat (limited to 'nova/api/openstack/compute/contrib/multinic.py')
-rw-r--r--nova/api/openstack/compute/contrib/multinic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/multinic.py b/nova/api/openstack/compute/contrib/multinic.py
index 924e2cf96e..c19ebaf58a 100644
--- a/nova/api/openstack/compute/contrib/multinic.py
+++ b/nova/api/openstack/compute/contrib/multinic.py
@@ -41,7 +41,7 @@ class MultinicController(wsgi.Controller):
want_objects=want_objects)
except exception.InstanceNotFound:
msg = _("Server not found")
- raise exc.HTTPNotFound(msg)
+ raise exc.HTTPNotFound(explanation=msg)
@wsgi.action('addFixedIp')
def _add_fixed_ip(self, req, id, body):