fix args, kwargs which were broken with #310. this is essentially the same but working

This commit is contained in:
Robin Gloster
2014-08-23 14:25:35 +02:00
parent afc939708f
commit 073e85381a
2 changed files with 16 additions and 3 deletions

View File

@@ -23,7 +23,12 @@ class _TimerReset(Thread):
t.cancel() # stop the timer's action if it's still waiting
"""
def __init__(self, interval, function, *args, **kwargs):
def __init__(self, interval, function, args=None, kwargs=None):
if not kwargs:
kwargs = {}
if not args:
args = []
Thread.__init__(self)
self.interval = interval
self.function = function