[Python-checkins] python/dist/src/Lib/email _parseaddr.py,1.4,1.5
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Mon, 17 Mar 2003 10:35:46 -0800
Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv29522
Modified Files:
_parseaddr.py
Log Message:
getaddrlist(): Make sure this consumes all the data, and if there is
no address there (perhaps because of invalid characters, it appends
('', '') to the result set.
Closes mimelib SF bug # 697641.
Index: _parseaddr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/_parseaddr.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** _parseaddr.py 30 Dec 2002 17:21:36 -0000 1.4
--- _parseaddr.py 17 Mar 2003 18:35:42 -0000 1.5
***************
*** 197,206 ****
"""
result = []
! while True:
ad = self.getaddress()
if ad:
result += ad
else:
! break
return result
--- 197,206 ----
"""
result = []
! while self.pos < len(self.field):
ad = self.getaddress()
if ad:
result += ad
else:
! result.append(('', ''))
return result