mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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.
This commit is contained in:
parent
c2ca32d9ae
commit
fa348c876f
1 changed files with 2 additions and 2 deletions
|
|
@ -196,12 +196,12 @@ def getaddrlist(self):
|
|||
Returns a list containing all of the addresses.
|
||||
"""
|
||||
result = []
|
||||
while True:
|
||||
while self.pos < len(self.field):
|
||||
ad = self.getaddress()
|
||||
if ad:
|
||||
result += ad
|
||||
else:
|
||||
break
|
||||
result.append(('', ''))
|
||||
return result
|
||||
|
||||
def getaddress(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue