summaryrefslogtreecommitdiffstats
path: root/nova/rpc.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-11-03 22:58:59 +0000
committerTarmac <>2010-11-03 22:58:59 +0000
commitad5013db5a2558b695d13b0e880884b0aee4fa69 (patch)
treea2dcead719e55389a90fb9a66d1c802f543ebb7d /nova/rpc.py
parentfb53f764a82dd8e6d1992c4c254e90c185fd9c53 (diff)
parent179d980dffc03e1ee0449954eed40b1d5489f6e0 (diff)
downloadnova-ad5013db5a2558b695d13b0e880884b0aee4fa69.tar.gz
nova-ad5013db5a2558b695d13b0e880884b0aee4fa69.tar.xz
nova-ad5013db5a2558b695d13b0e880884b0aee4fa69.zip
Ensures that keys for context from the queue are passed to the context constructor as strings. This prevents hangs on older versions of python that can't handle unicode kwargs.
Diffstat (limited to 'nova/rpc.py')
-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