summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-10-08 19:21:25 +0000
committerGerrit Code Review <review@openstack.org>2011-10-08 19:21:25 +0000
commite439217357f3a11f759aefd854d688ad12a8b59b (patch)
tree5729db57d1796e77dc348395ef0f2b9d62a43ef2 /nova/api
parent309229324be903f87e68aa72afb71d811a417262 (diff)
parent2915e6ba054b1f4100f788603358ea5b2b8220d5 (diff)
Merge "Make sure unknown extensions return 404"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/extensions.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py
index fae2bb1b1..43bc06014 100644
--- a/nova/api/openstack/extensions.py
+++ b/nova/api/openstack/extensions.py
@@ -197,8 +197,12 @@ class ExtensionsResource(wsgi.Resource):
return dict(extensions=extensions)
def show(self, req, id):
- # NOTE(dprince): the extensions alias is used as the 'id' for show
- ext = self.extension_manager.extensions[id]
+ try:
+ # NOTE(dprince): the extensions alias is used as the 'id' for show
+ ext = self.extension_manager.extensions[id]
+ except KeyError:
+ return faults.Fault(webob.exc.HTTPNotFound())
+
return dict(extension=self._translate(ext))
def delete(self, req, id):