summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-11-03 14:59:35 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2010-11-03 14:59:35 -0700
commit179d980dffc03e1ee0449954eed40b1d5489f6e0 (patch)
treea2dcead719e55389a90fb9a66d1c802f543ebb7d
parentfb53f764a82dd8e6d1992c4c254e90c185fd9c53 (diff)
downloadnova-179d980dffc03e1ee0449954eed40b1d5489f6e0.tar.gz
nova-179d980dffc03e1ee0449954eed40b1d5489f6e0.tar.xz
nova-179d980dffc03e1ee0449954eed40b1d5489f6e0.zip
make sure context keys are not unicode so they can be passed as kwargs
-rw-r--r--nova/rpc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/rpc.py b/nova/rpc.py
index 895820cd0..05eaa0f99 100644
--- a/nova/rpc.py
+++ b/nova/rpc.py
@@ -262,6 +262,9 @@ def _unpack_context(msg):
"""Unpack context from msg."""
context_dict = {}
for key in list(msg.keys()):
+ # NOTE(vish): Some versions of python don't like unicode keys
+ # in kwargs.
+ key = str(key)
if key.startswith('_context_'):
value = msg.pop(key)
context_dict[key[9:]] = value