diff options
author | Barry Warsaw <barry@python.org> | 2001-11-13 21:30:37 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-11-13 21:30:37 (GMT) |
commit | f1fd282f137952644a8c2a0330e3379e27a40582 (patch) | |
tree | a25b0209644b951a1b0a4574102c46040acbae0a | |
parent | 3ca656f1be84cd03852cc44958caacdb71f3b9ec (diff) | |
download | cpython-f1fd282f137952644a8c2a0330e3379e27a40582.zip cpython-f1fd282f137952644a8c2a0330e3379e27a40582.tar.gz cpython-f1fd282f137952644a8c2a0330e3379e27a40582.tar.bz2 |
Fix for bug #481221, getaddrlist() failing on long addresses.
-rw-r--r-- | Lib/rfc822.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 0019949..9ad2f8f 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -546,10 +546,14 @@ class AddrlistClass: Returns a list containing all of the addresses. """ - ad = self.getaddress() - if ad: - return ad + self.getaddrlist() - else: return [] + result = [] + while 1: + ad = self.getaddress() + if ad: + result += ad + else: + break + return result def getaddress(self): """Parse the next address.""" |