[Python-checkins] python/dist/src/Lib asyncore.py,1.35,1.36

theller@users.sourceforge.net theller@users.sourceforge.net
Tue, 24 Sep 2002 10:30:40 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv3142

Modified Files:
	asyncore.py 
Log Message:
On Windows, select() does not accept empty lists.
Patch suggested by Guido, fixes SF item 611464.

Bugfix candidate, will backport to release22-maint myself.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** asyncore.py	13 Sep 2002 14:09:26 -0000	1.35
--- asyncore.py	24 Sep 2002 17:30:31 -0000	1.36
***************
*** 51,54 ****
--- 51,55 ----
  import socket
  import sys
+ import time
  
  import os
***************
*** 101,109 ****
              if obj.writable():
                  w.append(fd)
!         try:
!             r, w, e = select.select(r, w, e, timeout)
!         except select.error, err:
!             if err[0] != EINTR:
!                 raise
  
          for fd in r:
--- 102,113 ----
              if obj.writable():
                  w.append(fd)
!         if [] == r == w == e:
!             time.sleep(timeout)
!         else:
!             try:
!                 r, w, e = select.select(r, w, e, timeout)
!             except select.error, err:
!                 if err[0] not in (EINTR, ENOENT):
!                     raise
  
          for fd in r: