diff options
| author | Dave Walker (Daviey) <DaveWalker@ubuntu.com> | 2011-05-21 13:00:06 +0100 |
|---|---|---|
| committer | Dave Walker (Daviey) <DaveWalker@ubuntu.com> | 2011-05-21 13:00:06 +0100 |
| commit | 968523ff49fc9d5aed7182b4084b2d7ec9f567ba (patch) | |
| tree | c713232fe4cb11abfd8af45c37012061a5ca6193 /nova/api | |
| parent | 0cc4a1c8de961d8c4c212c28ff008082184da5dd (diff) | |
| download | nova-968523ff49fc9d5aed7182b4084b2d7ec9f567ba.tar.gz nova-968523ff49fc9d5aed7182b4084b2d7ec9f567ba.tar.xz nova-968523ff49fc9d5aed7182b4084b2d7ec9f567ba.zip | |
When adding a keypair 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..4686c32ec 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.info(_('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), |
