mirror of
https://github.com/python/cpython
synced 2026-09-29 11:55:30 +03:00
Fix for bug #481221, getaddrlist() failing on long addresses.
This commit is contained in:
parent
3ca656f1be
commit
f1fd282f13
1 changed files with 8 additions and 4 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue