mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
Message.getaddrlist(): Use the AddressList.addresslist attribute
instead of calling the getaddrlist() method, since the latter doesn't work with multiple calls (it will return the empty list for the second and subsequent calls). Closes SF bug #555035. Include a unittest.
This commit is contained in:
parent
6cf09f0792
commit
0a8d4d5736
2 changed files with 21 additions and 2 deletions
|
@ -352,7 +352,7 @@ class Message:
|
|||
raw.append(addr)
|
||||
alladdrs = ''.join(raw)
|
||||
a = AddressList(alladdrs)
|
||||
return a.getaddrlist()
|
||||
return a.addresslist
|
||||
|
||||
def getdate(self, name):
|
||||
"""Retrieve a date field from a header.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue