You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2010/05/18 21:16:28 UTC
svn commit: r945833 - /qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py
Author: tross
Date: Tue May 18 19:16:28 2010
New Revision: 945833
URL: http://svn.apache.org/viewvc?rev=945833&view=rev
Log:
If a data update arrives with partial data, don't set the missing data to None, leave it absent.
Modified:
qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py
Modified: qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py?rev=945833&r1=945832&r2=945833&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py (original)
+++ qpid/trunk/qpid/extras/qmf/src/py/qmf/console.py Tue May 18 19:16:28 2010
@@ -187,8 +187,6 @@ class Object(object):
self._properties.append((prop, ObjectId(values[prop.name], agentName=agentName)))
else:
self._properties.append((prop, values[prop.name]))
- else:
- self._properties.append((prop, None))
for stat in self._schema.getStatistics():
if stat.name in values:
self._statistics.append((stat, values[stat.name]))
@@ -315,6 +313,16 @@ class Object(object):
for stat, value in self._statistics:
if name == stat.name:
return value
+
+ #
+ # Check to see if the name is in the schema. If so, return None (i.e. this is a not-present attribute)
+ #
+ for prop in self._schema.getProperties():
+ if name == prop.name:
+ return None
+ for stat in self._schema.getStatistics():
+ if name == stat.name:
+ return None
raise Exception("Type Object has no attribute '%s'" % name)
def __setattr__(self, name, value):
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org