diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2008-02-13 22:23:29 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2008-02-13 22:23:29 +0000 |
| commit | 194615a88fac0c4259b3c2217c8e13372b7c3b86 (patch) | |
| tree | d3ed38612b97b375d4d6b089148ab43267685a4d /lib/python/Components/Sources | |
| parent | 829ad562bb09e7e396320cd902263ec8b73f89dd (diff) | |
| download | enigma2-194615a88fac0c4259b3c2217c8e13372b7c3b86.tar.gz enigma2-194615a88fac0c4259b3c2217c8e13372b7c3b86.zip | |
implement proper 'destroy' functions in Converter
Diffstat (limited to 'lib/python/Components/Sources')
| -rw-r--r-- | lib/python/Components/Sources/Boolean.py | 6 | ||||
| -rw-r--r-- | lib/python/Components/Sources/Clock.py | 3 | ||||
| -rw-r--r-- | lib/python/Components/Sources/FrontendStatus.py | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/python/Components/Sources/Boolean.py b/lib/python/Components/Sources/Boolean.py index df7f81b2..21c2c2b9 100644 --- a/lib/python/Components/Sources/Boolean.py +++ b/lib/python/Components/Sources/Boolean.py @@ -18,6 +18,8 @@ class Boolean(Source, object): self.poll_timer = eTimer() self.poll_timer.timeout.get().append(self.poll) self.poll_timer.start(poll) + else: + self.poll_timer = None @cached def getBoolean(self): @@ -30,3 +32,7 @@ class Boolean(Source, object): def poll(self): self.changed((self.CHANGED_ALL,)) + + def destroy(self): + if self.poll_timer: + self.poll_timer.timeout.get().remove(self.poll) diff --git a/lib/python/Components/Sources/Clock.py b/lib/python/Components/Sources/Clock.py index 8341ebec..b59a20d5 100644 --- a/lib/python/Components/Sources/Clock.py +++ b/lib/python/Components/Sources/Clock.py @@ -26,3 +26,6 @@ class Clock(Source): else: self.clock_timer.start(1000) self.poll() + + def destroy(self): + self.clock_timer.timeout.get().remove(self.poll) diff --git a/lib/python/Components/Sources/FrontendStatus.py b/lib/python/Components/Sources/FrontendStatus.py index 5e096186..4d38f754 100644 --- a/lib/python/Components/Sources/FrontendStatus.py +++ b/lib/python/Components/Sources/FrontendStatus.py @@ -47,3 +47,6 @@ class FrontendStatus(Source): else: self.poll_timer.start(self.update_interval) + def destroy(self): + self.poll_timer.timeout.get().remove(self.updateFrontendStatus) + |
