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

View file

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