Commit 47782370 authored by Denis Bilenko's avatar Denis Bilenko

select.py: make 2.4 compatible

parent 315b5708
...@@ -35,9 +35,10 @@ def select(read_list, write_list, error_list, t=None): ...@@ -35,9 +35,10 @@ def select(read_list, write_list, error_list, t=None):
if t is not None: if t is not None:
t = gevent.timeout(t) t = gevent.timeout(t)
try: try:
return hub.switch() try:
except gevent.TimeoutError: return hub.switch()
return [], [], [] except gevent.TimeoutError:
return [], [], []
finally: finally:
for evt in allevents: for evt in allevents:
evt.cancel() evt.cancel()
......
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