diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-11-03 22:58:59 +0000 |
---|---|---|
committer | Tarmac <> | 2010-11-03 22:58:59 +0000 |
commit | ad5013db5a2558b695d13b0e880884b0aee4fa69 (patch) | |
tree | a2dcead719e55389a90fb9a66d1c802f543ebb7d /nova/rpc.py | |
parent | fb53f764a82dd8e6d1992c4c254e90c185fd9c53 (diff) | |
parent | 179d980dffc03e1ee0449954eed40b1d5489f6e0 (diff) | |
download | nova-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.py | 3 |
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 |