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
commite7bd73ed567ede0f564a10e679a7c0ec402c9f67 (patch)
treec5246ca605c50f6460e3b8294799b5949bbc3083
parentfd4e9e7748e89830f5fa96a83fdc054d7aba5380 (diff)
downloadqpid-python-e7bd73ed567ede0f564a10e679a7c0ec402c9f67.tar.gz
QPID-4756: only invoke property update callback if properties are present
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1476373 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/cpp/src/tests/qpidd_qmfv2_tests.py2
-rw-r--r--qpid/extras/qmf/src/py/qmf/console.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/qpidd_qmfv2_tests.py b/qpid/cpp/src/tests/qpidd_qmfv2_tests.py
index 8e32e466c5..36fbe4b438 100755
--- a/qpid/cpp/src/tests/qpidd_qmfv2_tests.py
+++ b/qpid/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/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py
index 2d80bd26d2..d1f04f5ba9 100644
--- a/qpid/extras/qmf/src/py/qmf/console.py
+++ b/qpid/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)