From: Zac Medico Date: Fri, 8 Aug 2008 11:01:22 +0000 (-0000) Subject: Handle missing ipv6 support (branches/prefix r11347). X-Git-Tag: v2.2_rc7~35 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2e5c28ed64b7e870bc2d0799efcf786e2577fdc3;p=portage.git Handle missing ipv6 support (branches/prefix r11347). svn path=/main/trunk/; revision=11348 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 35ac098ab..cf1143b70 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11114,7 +11114,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): try: for addrinfo in socket.getaddrinfo( hostname, None, family, socket.SOCK_STREAM): - if addrinfo[0] == socket.AF_INET6: + if socket.has_ipv6 and addrinfo[0] == socket.AF_INET6: # IPv6 addresses need to be enclosed in square brackets ips.append("[%s]" % addrinfo[4][0]) else: