[Python-checkins] python/dist/src/Lib asyncore.py,1.56,1.57
akuchling at users.sourceforge.net
akuchling at users.sourceforge.net
Sat Jul 10 19:36:13 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30755
Modified Files:
asyncore.py
Log Message:
In poll(), check connections for exceptional conditions
Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** asyncore.py 10 Jul 2004 15:51:19 -0000 1.56
--- asyncore.py 10 Jul 2004 17:36:11 -0000 1.57
***************
*** 81,84 ****
--- 81,92 ----
obj.handle_error()
+ def _exception (obj):
+ try:
+ obj.handle_expt_event()
+ except ExitNow:
+ raise
+ except:
+ obj.handle_error()
+
def readwrite(obj, flags):
try:
***************
*** 100,103 ****
--- 108,112 ----
r = []; w = []; e = []
for fd, obj in map.items():
+ e.append(fd)
if obj.readable():
r.append(fd)
***************
*** 127,130 ****
--- 136,145 ----
write(obj)
+ for fd in e:
+ obj = map.get(fd)
+ if obj is None:
+ continue
+ _exception(obj)
+
def poll2(timeout=0.0, map=None):
# Use the poll() support added to the select module in Python 2.0
More information about the Python-checkins
mailing list