[Python-checkins] python/dist/src/Lib asyncore.py,1.28.4.3,1.28.4.4

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Thu, 20 Feb 2003 23:16:39 -0800


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

Modified Files:
      Tag: release22-maint
	asyncore.py 
Log Message:
Backport 1.38:
 Fix an old bug in poll().  When a signal is handled while we're
 blocked in select(), this will raise select.error with errno set to
 EINTR.  The except clauses correctly ignores this error, but the rest
 of the logic will then call read() for all objects in select's *input*
 list of read file descriptors.  Then when an object's read_handler()
 is naive, it will call recv() on its socket, which will raise an
 IOError, and then asyncore decides to close the socket.  To fix this,
 we simply return in this case.
 Backport candidate.

Backport 1.40:
 Fix spelling error



Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.28.4.3
retrieving revision 1.28.4.4
diff -C2 -d -r1.28.4.3 -r1.28.4.4
*** asyncore.py	24 Sep 2002 17:44:40 -0000	1.28.4.3
--- asyncore.py	21 Feb 2003 07:16:37 -0000	1.28.4.4
***************
*** 85,89 ****
                  if err[0] != EINTR:
                      raise
!                 r = []; w = []; e = []
  
          if DEBUG:
--- 85,90 ----
                  if err[0] != EINTR:
                      raise
!                 else:
!                     return
  
          if DEBUG:
***************
*** 371,375 ****
          return getattr (self.socket, attr)
  
!     # log and log_info maybe overriden to provide more sophisitcated
      # logging and warning methods. In general, log is for 'hit' logging
      # and 'log_info' is for informational, warning and error logging.
--- 372,376 ----
          return getattr (self.socket, attr)
  
!     # log and log_info maybe overriden to provide more sophisticated
      # logging and warning methods. In general, log is for 'hit' logging
      # and 'log_info' is for informational, warning and error logging.