summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2013-03-23 13:22:31 -0700
committerGuido van Rossum <guido@python.org>2013-03-23 13:22:31 -0700
commit7929e8a8c09fedeb4b25e3ffd048d3be1f879e36 (patch)
tree07a2f1218ef0534e3e41b52c88af62723b71fb5d
parent300fbebe8329bac52bc00ff42789b0002939fdd3 (diff)
downloadtrollius-7929e8a8c09fedeb4b25e3ffd048d3be1f879e36.tar.gz
Tiny cleanup.
-rw-r--r--tulip/base_events.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tulip/base_events.py b/tulip/base_events.py
index 46cab27..2aebcb8 100644
--- a/tulip/base_events.py
+++ b/tulip/base_events.py
@@ -211,8 +211,6 @@ class BaseEventLoop(events.AbstractEventLoop):
Any positional arguments after the callback will be passed to
the callback when it is called.
-
- # TODO: Should delay is None be interpreted as Infinity?
"""
if delay <= 0:
return self.call_soon(callback, *args)
@@ -223,6 +221,7 @@ class BaseEventLoop(events.AbstractEventLoop):
def call_repeatedly(self, interval, callback, *args):
"""Call a callback every 'interval' seconds."""
+ assert interval > 0, 'Interval must be > 0: %r' % (interval,)
def wrapper():
callback(*args) # If this fails, the chain is broken.
handle._when = time.monotonic() + interval