aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/Sources')
-rw-r--r--lib/python/Components/Sources/Boolean.py6
-rw-r--r--lib/python/Components/Sources/Clock.py3
-rw-r--r--lib/python/Components/Sources/FrontendStatus.py3
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)
+