This commit is contained in:
@ -15,7 +15,7 @@ class LoopingTimer:
|
||||
"""
|
||||
Looping timer. Executes a function and repeates it in the given interval.
|
||||
"""
|
||||
def __init__(self, interval, function, tick_args=[], tick_kwargs={}):
|
||||
def __init__(self, interval, function, tick_args=None, tick_kwargs=None):
|
||||
"""
|
||||
Initialize class
|
||||
:param interval:
|
||||
@ -26,8 +26,8 @@ class LoopingTimer:
|
||||
self._timer = None
|
||||
self.interval = interval
|
||||
self.function = function
|
||||
self._tick_args = tick_args
|
||||
self._tick_kwargs = tick_kwargs
|
||||
self._tick_args = tick_args or []
|
||||
self._tick_kwargs = tick_kwargs or {}
|
||||
self.is_running = False
|
||||
self.start()
|
||||
|
||||
|
Reference in New Issue
Block a user