summaryrefslogtreecommitdiff
path: root/Lib/rfc822.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-05-21 19:46:13 +0000
committerBarry Warsaw <barry@python.org>2002-05-21 19:46:13 +0000
commit0a8d4d5736c8cceda74e7134a6ff446fbee1d5cc (patch)
treea4398880090f36d335aceb320098fb563c656b6d /Lib/rfc822.py
parent6cf09f0792df49527cda241743a34c3555a83835 (diff)
downloadcpython-git-0a8d4d5736c8cceda74e7134a6ff446fbee1d5cc.tar.gz
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.
Diffstat (limited to 'Lib/rfc822.py')
-rw-r--r--Lib/rfc822.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index aa58f1889e..826269fe1a 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -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.