diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-10-13 20:44:30 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-10-13 20:44:30 -0700 |
commit | 25db41ade6a0551d368bb58bc84d9c259a027a89 (patch) | |
tree | 1e6618a8306fb653cd6ccaa8ead7c04529a0acb1 | |
parent | c54c1af789b306a85e9d7e79fb54f02a05346616 (diff) | |
download | portage-25db41ade6a0551d368bb58bc84d9c259a027a89.tar.gz portage-25db41ade6a0551d368bb58bc84d9c259a027a89.tar.bz2 portage-25db41ade6a0551d368bb58bc84d9c259a027a89.zip |
Ensure getaddrinfo fallback works when necessary.v2.2_rc96
-rw-r--r-- | pym/_emerge/actions.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 186e508f7..1a7dd7fbe 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2109,11 +2109,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): "!!! getaddrinfo failed for '%s': %s\n" % (hostname, e), noiselevel=-1, level=logging.ERROR) - if not addrinfos: - # With some configurations we need to use the plain hostname - # rather than try to resolve the ip addresses (bug #340817). - uris.append(syncuri) - else: + if addrinfos: AF_INET = socket.AF_INET AF_INET6 = None @@ -2146,6 +2142,11 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): "//" + user_name + hostname + port + "/", "//" + user_name + ip + port + "/", 1)) + if not uris: + # With some configurations we need to use the plain hostname + # rather than try to resolve the ip addresses (bug #340817). + uris.append(syncuri) + # reverse, for use with pop() uris.reverse() |