diff options
| author | Alexis Metaireau <ametaireau@gmail.com> | 2010-07-30 11:48:45 +0200 |
|---|---|---|
| committer | Alexis Metaireau <ametaireau@gmail.com> | 2010-07-30 11:48:45 +0200 |
| commit | 5ded93e5c5fad2e5449e7048a8af6f82e47930b7 (patch) | |
| tree | 183dad5fbd0ec98ea7617344af024408140b0cf8 /src | |
| parent | 4b117f764ae79e916b50508f5218531f0986f1bd (diff) | |
| download | disutils2-5ded93e5c5fad2e5449e7048a8af6f82e47930b7.tar.gz | |
Update the mirror support accordingly with last MvL changes.
The DNS record is now a A one, not a CNAME one. This fix windows issues about
DNS resolution.
See PEP 381 for more informations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/distutils2/index/mirrors.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/distutils2/index/mirrors.py b/src/distutils2/index/mirrors.py index 3211150..49d5dd1 100644 --- a/src/distutils2/index/mirrors.py +++ b/src/distutils2/index/mirrors.py @@ -22,13 +22,10 @@ def get_mirrors(hostname=None): # return the last mirror registered on PyPI. try: - unused, aliaslist, ipaddr = socket.gethostbyname_ex(hostname) + hostname = socket.gethostbyname_ex(hostname)[0] except socket.gaierror: return [] - if len(aliaslist) < 2: - return [] - index_adress = aliaslist[-1] - end_letter = index_adress.split(".", 1) + end_letter = hostname.split(".", 1) # determine the list from the last one. return ["%s.%s" % (s, end_letter[1]) for s in string_range(end_letter[0])] |
