Don't use set() since it's not in python 2.3.

Just use a plain list instead.  Technically probably slightly worse
asymptotic behaviour, but it's not like we'll have a million sockets anyway.
This commit is contained in:
Avery Pennarun
2010-10-01 14:23:27 -07:00
parent da774f3f46
commit c403a83ab8
4 changed files with 34 additions and 21 deletions

View File

@ -176,9 +176,9 @@ def _main(listener, fw, use_server, remotename, python, seed_hosts, auto_nets):
if rv:
raise Fatal('server died with error code %d' % rv)
r = set()
w = set()
x = set()
r = []
w = []
x = []
handlers = filter(lambda s: s.ok, handlers)
for s in handlers:
s.pre_select(r,w,x)
@ -186,9 +186,9 @@ def _main(listener, fw, use_server, remotename, python, seed_hosts, auto_nets):
% (len(handlers), len(r), len(w), len(x)))
(r,w,x) = select.select(r,w,x)
#log('r=%r w=%r x=%r\n' % (r,w,x))
ready = set(r) | set(w) | set(x)
ready = r+w+x
for s in handlers:
if s.socks & ready:
if list_contains_any(s.socks, ready):
s.callback()
if use_server:
mux.callback()