Handle missing ipv6 support (branches/prefix r11347).
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 11:01:22 +0000 (11:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Aug 2008 11:01:22 +0000 (11:01 -0000)
svn path=/main/trunk/; revision=11348

pym/_emerge/__init__.py

index 35ac098ab79208fb025aeaf27c90e16fcd99078d..cf1143b70b8d2b99064e5dd91e367fb2d43d527e 100644 (file)
@@ -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: