diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-10 01:59:00 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-10 01:59:00 +0000 |
| commit | 95d678d2d62ba6264e9fd704317d61cbedf22d30 (patch) | |
| tree | a5fb51e383b4f8f875a964b6af1318b052dd685e /nova | |
| parent | b5077015ceebfb038f3da6e47d8a64f117e00060 (diff) | |
| parent | 13fd37932452874f7dad7e4bb2230cf6f16073e7 (diff) | |
Merge "Fix KeyError 'key_name' when KeyPairExists raised."
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/api.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 70528271f..a8e9840aa 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1828,8 +1828,7 @@ class KeypairAPI(base.Base): # NOTE: check for existing keypairs of same name try: self.db.key_pair_get(context, user_id, key_name) - msg = _("Key pair '%s' already exists.") % key_name - raise exception.KeyPairExists(explanation=msg) + raise exception.KeyPairExists(key_name=key_name) except exception.NotFound: pass |
