[Python-checkins] python/dist/src/Lib imaplib.py,1.67,1.68 (original) (raw)
pierslauder at users.sourceforge.net pierslauder at users.sourceforge.net
Wed May 19 21:16:18 EDT 2004
- Previous message: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.45, 1.46
- Next message: [Python-checkins] python/dist/src/Lib imaplib.py,1.68,1.69
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17355/dist/src/Lib
Modified Files: imaplib.py Log Message: Fixed IMAP4_SSL read and readlines code per patch 956394
Index: imaplib.py
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** imaplib.py 25 Mar 2004 00:12:21 -0000 1.67 --- imaplib.py 20 May 2004 01:16:14 -0000 1.68
*** 1101,1109 **** """Read 'size' bytes from remote.""" # sslobj.read() sometimes returns < size bytes ! data = self.sslobj.read(size) ! while len(data) < size: ! data += self.sslobj.read(size-len(data))
! return data
--- 1101,1112 ---- """Read 'size' bytes from remote.""" # sslobj.read() sometimes returns < size bytes ! chunks = [] ! read = 0 ! while read < size: ! data = self.sslobj.read(size-read) ! read += len(data) ! chunks.append(size)
! return ''.join(chunks)
*** 1111,1119 **** """Read line from remote.""" # NB: socket.ssl needs a "readline" method, or perhaps a "makefile" method. ! line = "" while 1: char = self.sslobj.read(1) ! line += char ! if char == "\n": return line
--- 1114,1122 ---- """Read line from remote.""" # NB: socket.ssl needs a "readline" method, or perhaps a "makefile" method. ! line = [] while 1: char = self.sslobj.read(1) ! line.append(char) ! if char == "\n": return ''.join(line)
- Previous message: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew24.tex, 1.45, 1.46
- Next message: [Python-checkins] python/dist/src/Lib imaplib.py,1.68,1.69
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]