diff options
| author | Ted Ross <tross@apache.org> | 2010-05-18 19:16:28 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2010-05-18 19:16:28 +0000 |
| commit | 44b3a42541ebc2204c6a64eb4020fc7b8283b9ee (patch) | |
| tree | ba253ea9705d55006018de6d839e1e046743bfa5 | |
| parent | c6b5208b23d4e88d3371826d5aac3225f8372f38 (diff) | |
| download | qpid-python-44b3a42541ebc2204c6a64eb4020fc7b8283b9ee.tar.gz | |
If a data update arrives with partial data, don't set the missing data to None, leave it absent.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@945833 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/extras/qmf/src/py/qmf/console.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py index 8612d2cd2c..2e1f98a161 100644 --- a/qpid/extras/qmf/src/py/qmf/console.py +++ b/qpid/extras/qmf/src/py/qmf/console.py @@ -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): |
