~ubuntu-dev/ubuntu/lucid/coherence/lucid-201002101853

« back to all changes in this revision

Viewing changes to coherence/upnp/core/device.py

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2008-03-05 13:43:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080305134301-pg572ehbze3h7cii
Tags: 0.5.2-1
* New upstream release
* debian/control: depend on python-pkg-resources instead of
  python-setuptools for the runtime dependency (Closes: #468724)

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
        now = time.time()
128
128
        for service in self.get_services():
129
129
            self.info("check service %r %r " % (service.id, service.get_sid()), service.get_timeout(), now)
130
 
            if service.get_sid() != None:
 
130
            if service.get_sid() is not None:
131
131
                if service.get_timeout() < now:
132
132
                    self.debug("wow, we lost an event subscription for %s %s, " % (self.friendly_name, service.get_id()),
133
133
                          "maybe we need to rethink the loop time and timeout calculation?")
138
138
        """ iterate over device's services and unsubscribe subscriptions """
139
139
        l = []
140
140
        for service in self.get_services():
141
 
            if service.get_sid() != None:
 
141
            if service.get_sid() is not None:
142
142
                l.append(service.unsubscribe())
143
143
        dl = defer.DeferredList(l)
144
144
        return dl