summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Peinthor <peinthor@gmail.com>2012-12-12 13:31:20 +0100
committerRene Peinthor <peinthor@gmail.com>2012-12-12 13:31:20 +0100
commit912269f73ad01ecbbe08b16f664e56541c752392 (patch)
tree7af9714a6ef4fbd6b0b8d9046c0c059f89e1d43c
parentefaee24a13e73de5bd447ac53a70c39d5ba60790 (diff)
downloadcherrypy-912269f73ad01ecbbe08b16f664e56541c752392.tar.gz
Fixes for python2
Tested on python 2.3 and python 2.6
-rw-r--r--cherrypy/process/plugins.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cherrypy/process/plugins.py b/cherrypy/process/plugins.py
index 4437e36a..ce39e90c 100644
--- a/cherrypy/process/plugins.py
+++ b/cherrypy/process/plugins.py
@@ -460,7 +460,7 @@ class BackgroundTask(threading.Thread):
it won't delay stopping the whole process.
"""
- def __init__(self, interval, function, args=[], kwargs={}, bus=None, *, daemon=True):
+ def __init__(self, interval, function, args=[], kwargs={}, bus=None, daemon=True):
threading.Thread.__init__(self)
self.interval = interval
self.function = function
@@ -491,6 +491,9 @@ class BackgroundTask(threading.Thread):
# Quit on first error to avoid massive logs.
raise
+ def _set_daemon(self):
+ return True
+
class Monitor(SimplePlugin):
"""WSPBus listener to periodically run a callback in its own thread."""