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:
Barry Warsaw 2002-05-21 19:46:13 +00:00
parent 6cf09f0792
commit 0a8d4d5736
2 changed files with 21 additions and 2 deletions

View file

@ -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.