~ubuntu-branches/ubuntu/natty/landscape-client/natty

« back to all changes in this revision

Viewing changes to landscape/schema.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-04-21 19:58:10 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100421195810-s30uv3s6i27lue38
Tags: 1.5.2-0ubuntu0.10.10.0
* New upstream version (LP: #594594):
  - A new includes information about active network devices and their
    IP address in sysinfo output (LP: #272344).
  - A new plugin collects information about network traffic (#LP :284662).
  - Report information about which packages requested a reboot (LP: #538253).
  - Fix breakage on Lucid AMIs having no ramdisk (LP: #574810).
  - Migrate the inter-process communication system from DBus to Twisted AMP.

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
        else:
225
225
            optional = ["timestamp", "api"]
226
226
        super(Message, self).__init__(schema, optional=optional)
 
227
 
 
228
    def coerce(self, value):
 
229
        for k in value.keys():
 
230
            if k not in self.schema:
 
231
                # We don't know about this field, just discard it. This
 
232
                # is useful when a client that introduced some new field
 
233
                # in a message talks to an older server, that don't understand
 
234
                # the new field yet.
 
235
                value.pop(k)
 
236
        return super(Message, self).coerce(value)