[Python-checkins] CVS: python/dist/src/Lib imaplib.py,1.35,1.36
Piers Lauder
pierslauder@users.sourceforge.net
2001年10月21日 13:26:39 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv28671/dist/src/Lib
Modified Files:
imaplib.py
Log Message:
fix send method not noticing when partial sends happen
Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** imaplib.py 2001年10月15日 13:46:10 1.35
--- imaplib.py 2001年10月21日 20:26:37 1.36
***************
*** 223,227 ****
def send(self, data):
"""Send data to remote."""
! self.sock.send(data)
--- 223,233 ----
def send(self, data):
"""Send data to remote."""
! bytes = len(data)
! while bytes > 0:
! sent = self.sock.send(data)
! if sent == bytes:
! break # avoid copy
! data = data[sent:]
! bytes = bytes - sent