Remove the temporary hack in code

remove the temporary hack in code amqpdriver.py

Change-Id: I7ba9666fc15a6fc4ab27b04362e94661c00547c5
This commit is contained in:
zhangshengping2012 2016-10-26 12:19:51 +08:00
parent 7b5bec3133
commit e40f6398f9

View File

@ -394,15 +394,6 @@ class AMQPDriverBase(base.BaseDriver):
wait_for_reply=None, timeout=None,
envelope=True, notify=False, retry=None):
# FIXME(markmc): remove this temporary hack
class Context(object):
def __init__(self, d):
self.d = d
def to_dict(self):
return self.d
context = Context(ctxt)
msg = message
if wait_for_reply:
@ -413,7 +404,7 @@ class AMQPDriverBase(base.BaseDriver):
rpc_amqp._add_unique_id(msg)
unique_id = msg[rpc_amqp.UNIQUE_ID]
rpc_amqp.pack_context(msg, context)
rpc_amqp.pack_context(msg, ctxt)
if envelope:
msg = rpc_common.serialize_msg(msg)