summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py2
1 files changed, 1 insertions, 1 deletions
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: