summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2013-04-26 20:06:03 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2013-04-26 20:06:03 +0000
commitdfdc955edfc88a4e79b331d3f902f8461245b6bd (patch)
tree3bc853863ea492a1c8287c6ce6c021daef286093
parentaf316c93e90bc8790d209e96776bcd17b4ec5e98 (diff)
downloadqpid-python-dfdc955edfc88a4e79b331d3f902f8461245b6bd.tar.gz
QPID-4756: only invoke property update callback if properties are present
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1476373 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xcpp/src/tests/qpidd_qmfv2_tests.py2
-rw-r--r--extras/qmf/src/py/qmf/console.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/tests/qpidd_qmfv2_tests.py b/cpp/src/tests/qpidd_qmfv2_tests.py
index 8e32e466c5..36fbe4b438 100755
--- a/cpp/src/tests/qpidd_qmfv2_tests.py
+++ b/cpp/src/tests/qpidd_qmfv2_tests.py
@@ -111,6 +111,7 @@ class ConsoleTest(BrokerTest):
self.events.append(event)
def objectProps(self, broker, record):
#print "ObjProps %s" % record
+ assert len(record.getProperties()), "objectProps() invoked with no properties?"
oid = record.getObjectId()
if oid not in self.updates:
self.updates[oid] = record
@@ -118,6 +119,7 @@ class ConsoleTest(BrokerTest):
self.updates[oid].mergeUpdate( record )
def objectStats(self, broker, record):
#print "ObjStats %s" % record
+ assert len(record.getStatistics()), "objectStats() invoked with no properties?"
oid = record.getObjectId()
if oid not in self.updates:
self.updates[oid] = record
diff --git a/extras/qmf/src/py/qmf/console.py b/extras/qmf/src/py/qmf/console.py
index 2d80bd26d2..d1f04f5ba9 100644
--- a/extras/qmf/src/py/qmf/console.py
+++ b/extras/qmf/src/py/qmf/console.py
@@ -3108,7 +3108,8 @@ class Agent:
if ((pname, cname) not in self.session.class_filter
and (pname, None) not in self.session.class_filter):
return
- self.session.console.objectProps(self.broker, obj)
+ if obj.getProperties():
+ self.session.console.objectProps(self.broker, obj)
if obj.getStatistics():
# QMFv2 objects may also contain statistic updates
self.session.console.objectStats(self.broker, obj)