diff options
| author | Dave Walker (Daviey) <DaveWalker@ubuntu.com> | 2011-05-24 16:36:04 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-05-24 16:36:04 +0000 |
| commit | 16ad120a23552f962a6f68f8cab7aca45a430c48 (patch) | |
| tree | cc125589ae699970142716543457342d6dcd799c /nova/api | |
| parent | 8eebc3c701bdbbdb1e03a133c66109048fec909f (diff) | |
| parent | 107eedf06ba6d27e65169302bd51a391e6e104f7 (diff) | |
When adding a keypair with ec2 API that already exists, give a friendly error and no traceback in nova-api
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index cd59340bd..c13993dd3 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -338,6 +338,10 @@ class Executor(wsgi.Application): else: return self._error(req, context, type(ex).__name__, unicode(ex)) + except exception.KeyPairExists as ex: + LOG.debug(_('KeyPairExists raised: %s'), unicode(ex), + context=context) + return self._error(req, context, type(ex).__name__, unicode(ex)) except Exception as ex: extra = {'environment': req.environ} LOG.exception(_('Unexpected error raised: %s'), unicode(ex), |
