Fix for bug #481221, getaddrlist() failing on long addresses.

This commit is contained in:
Barry Warsaw 2001-11-13 21:30:37 +00:00
parent 3ca656f1be
commit f1fd282f13
1 changed files with 8 additions and 4 deletions

View File

@ -546,10 +546,14 @@ def getaddrlist(self):
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."""