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
commit66e11a608ce5d894d9a98d42b80e570f3585935c (patch)
tree93bd8574270d335c9a15846faa0d4e966325fc48
parent057720527ff593ab43cf00fb58072f08f6916044 (diff)
downloadcherrypy-66e11a608ce5d894d9a98d42b80e570f3585935c.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 cc22cc63..8be25505 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."""