Commit eb4da3dc authored by Denis Bilenko's avatar Denis Bilenko

remove assert from sleep(); the condition is already tested for in get_hub().switch

parent efa962b9
...@@ -164,7 +164,6 @@ def sleep(seconds=0): ...@@ -164,7 +164,6 @@ def sleep(seconds=0):
nothing else will run. nothing else will run.
""" """
hub = get_hub() hub = get_hub()
assert hub.greenlet is not greenlet.getcurrent(), 'do not call blocking functions from the mainloop'
t = core.timer(seconds, greenlet.getcurrent().switch) t = core.timer(seconds, greenlet.getcurrent().switch)
try: try:
hub.switch() hub.switch()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment