summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kotton <gkotton@vmware.com>2014-11-16 01:53:03 -0800
committerGary Kotton <gkotton@vmware.com>2014-11-16 01:53:03 -0800
commit2353719b6f1e6b317be3fc1d605e5476f655a854 (patch)
tree156267affbd8ea44673d60652d2549b43fbf3b15
parent903bac3f48b9eafef8d941d6f8f50a27b0b5c01f (diff)
downloadnova-2353719b6f1e6b317be3fc1d605e5476f655a854.tar.gz
Key manager: ensure exception reason is translated
Add missing translations to exceptions. Change-Id: Id3ec185ab96693ce0b4f5c21e5a66e665959ad34
-rw-r--r--nova/keymgr/single_key_mgr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/keymgr/single_key_mgr.py b/nova/keymgr/single_key_mgr.py
index 33c24c0e63..8e878a45b7 100644
--- a/nova/keymgr/single_key_mgr.py
+++ b/nova/keymgr/single_key_mgr.py
@@ -57,7 +57,7 @@ class SingleKeyManager(mock_key_mgr.MockKeyManager):
def store_key(self, ctxt, key, **kwargs):
if key != self.key:
raise exception.KeyManagerError(
- reason="cannot store arbitrary keys")
+ reason=_("cannot store arbitrary keys"))
return super(SingleKeyManager, self).store_key(ctxt, key, **kwargs)
@@ -67,6 +67,6 @@ class SingleKeyManager(mock_key_mgr.MockKeyManager):
if key_id != self.key_id:
raise exception.KeyManagerError(
- reason="cannot delete non-existent key")
+ reason=_("cannot delete non-existent key"))
LOG.warn(_("Not deleting key %s"), key_id)