summaryrefslogtreecommitdiff
path: root/cherrypy/process/plugins.py
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
commitf150df0b4ba46098ac2c49ab4e4b31d30709e52e (patch)
tree4e38f9c18d4b0ae9ce2653dbae6b7c5ec3db0004 /cherrypy/process/plugins.py
parent9e4be1a8c48feb0cdca5a67007cb6a69c2a597f8 (diff)
downloadcherrypy-git-f150df0b4ba46098ac2c49ab4e4b31d30709e52e.tar.gz
Fixes for python2
Tested on python 2.3 and python 2.6
Diffstat (limited to 'cherrypy/process/plugins.py')
-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."""