~ubuntu-branches/ubuntu/trusty/coherence/trusty

« 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-07-13 15:18:54 UTC
  • mfrom: (1.1.4 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080713151854-3i4pvo3xeg9wzcsu
Tags: 0.5.8-1
* New upstream release
* debian/control:
  - add a Homepage field
  - complete Depends with python-nose (Closes: #489198)
  - complete Depends for the mediadb backend (Ubuntu report 235910)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
from coherence.upnp.core import utils
14
14
from coherence import log
15
15
 
16
 
import louie
 
16
import coherence.extern.louie as louie
17
17
 
18
18
ns = "urn:schemas-upnp-org:device-1-0"
19
19
 
116
116
        """ iterate over device's services and renew subscriptions """
117
117
        self.info("renew service subscriptions for %s" % self.friendly_name)
118
118
        now = time.time()
119
 
        for service in self.get_services():
 
119
        for service in self.services:
120
120
            self.info("check service %r %r " % (service.id, service.get_sid()), service.get_timeout(), now)
121
121
            if service.get_sid() is not None:
122
122
                if service.get_timeout() < now:
125
125
                if service.get_timeout() < now + 30 :
126
126
                    service.renew_subscription()
127
127
 
 
128
        for device in self.devices:
 
129
            device.renew_service_subscriptions()
 
130
 
128
131
    def unsubscribe_service_subscriptions(self):
129
132
        """ iterate over device's services and unsubscribe subscriptions """
130
133
        l = []