From 8507479d8ec50b4854b866a547932e5e38db1cd1 Mon Sep 17 00:00:00 2001 From: Nuno Santos Date: Tue, 15 Apr 2008 16:12:01 +0000 Subject: QPID-921: applied qpid-patch36.diff on behalf of Ted Ross git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@648308 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/management.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/qpid/management.py') diff --git a/python/qpid/management.py b/python/qpid/management.py index d2dcacd62a..d32d458270 100644 --- a/python/qpid/management.py +++ b/python/qpid/management.py @@ -83,11 +83,11 @@ class methodResult: class managementChannel: """ This class represents a connection to an AMQP broker. """ - def __init__ (self, ch, topicCb, replyCb, cbContext): + def __init__ (self, ch, topicCb, replyCb, cbContext, _detlife=0): """ Given a channel on an established AMQP broker connection, this method opens a session and performs all of the declarations and bindings needed to participate in the management protocol. """ - response = ch.session_open (detached_lifetime=300) + response = ch.session_open (detached_lifetime=_detlife) self.sessionId = response.session_id self.topicName = "mgmt-%08x-%04x-%04x-%04x-%04x%08x" % struct.unpack ("!LHHHHL", response.session_id) self.replyName = "repl-%08x-%04x-%04x-%04x-%04x%08x" % struct.unpack ("!LHHHHL", response.session_id) @@ -97,8 +97,8 @@ class managementChannel: self.context = cbContext self.reqsOutstanding = 0 - ch.queue_declare (queue=self.topicName, exclusive=1, auto_delete=1) - ch.queue_declare (queue=self.replyName, exclusive=1, auto_delete=1) + ch.queue_declare (queue=self.topicName, exclusive=True, auto_delete=True) + ch.queue_declare (queue=self.replyName, exclusive=True, auto_delete=True) ch.queue_bind (exchange="qpid.management", queue=self.topicName, routing_key="mgmt.#") -- cgit v1.2.1