summaryrefslogtreecommitdiff
path: root/python/qmf
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-07-17 19:54:09 +0000
committerTed Ross <tross@apache.org>2009-07-17 19:54:09 +0000
commit5f3c95bd7845f9f583d3cab616e757deff03509c (patch)
treedb345be0ca253ce876b6f89ab6d54af3cd4c3196 /python/qmf
parentf8270eed56acb48d362ec0d3bab1fb89d1c568c9 (diff)
downloadqpid-python-5f3c95bd7845f9f583d3cab616e757deff03509c.tar.gz
QPID-1973 - Calling session.objects fails to return objects in certain cases
There is a window during which object queries fail because the console does not have up-to-date agent information. This fix closes the window completely. I would like to find a more elegant and efficient solution to this problem, but this will work for now. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@795209 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qmf')
-rw-r--r--python/qmf/console.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/qmf/console.py b/python/qmf/console.py
index c3ef0a1a50..315d581fc6 100644
--- a/python/qmf/console.py
+++ b/python/qmf/console.py
@@ -609,6 +609,12 @@ class Session:
brokerList = self.brokers
for broker in brokerList:
broker._waitForStable()
+ if broker.isConnected():
+ if "_package" not in kwargs or "_class" not in kwargs or \
+ kwargs["_package"] != "org.apache.qpid.broker" or \
+ kwargs["_class"] != "agent":
+ self.getObjects(_package = "org.apache.qpid.broker", _class = "agent",
+ _agent = broker.getAgent(1,0))
agentList = []
if "_agent" in kwargs: