diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-03-06 19:08:48 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-03-06 19:08:48 +0000 |
| commit | 4a1f477df0dda3b10084bcb2b225379efa0ea8ae (patch) | |
| tree | 00cac6228e46e0dd71966acda90fe552ed7de9b6 /nova/api | |
| parent | 34a64499dfdf3694dfae1f883708950595e8ab20 (diff) | |
| parent | adbccac10a362d7464bb30f9ae923d0446833a21 (diff) | |
| download | nova-4a1f477df0dda3b10084bcb2b225379efa0ea8ae.tar.gz nova-4a1f477df0dda3b10084bcb2b225379efa0ea8ae.tar.xz nova-4a1f477df0dda3b10084bcb2b225379efa0ea8ae.zip | |
Merge "Don't traceback in the API on invalid keypair."
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/keypairs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/keypairs.py b/nova/api/openstack/compute/contrib/keypairs.py index 4f6ad6b18..a79b39aae 100644 --- a/nova/api/openstack/compute/contrib/keypairs.py +++ b/nova/api/openstack/compute/contrib/keypairs.py @@ -119,7 +119,10 @@ class KeypairController(object): context = req.environ['nova.context'] authorize(context) - keypair = self.api.get_key_pair(context, context.user_id, id) + try: + keypair = self.api.get_key_pair(context, context.user_id, id) + except exception.KeypairNotFound: + raise webob.exc.HTTPNotFound() return {'keypair': keypair} @wsgi.serializers(xml=KeypairsTemplate) |
