aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portage/sync/modules/rsync/rsync.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/portage/sync/modules/rsync/rsync.py b/lib/portage/sync/modules/rsync/rsync.py
index 15c3eb4da..e89221ebc 100644
--- a/lib/portage/sync/modules/rsync/rsync.py
+++ b/lib/portage/sync/modules/rsync/rsync.py
@@ -19,6 +19,7 @@ from portage import _unicode_decode
from portage import os
from portage.const import VCS_DIRS, TIMESTAMP_FORMAT, RSYNC_PACKAGE_ATOM
from portage.output import create_color_func, yellow, blue, bold
+from portage.process import has_ipv6
from portage.sync.getaddrinfo_validate import getaddrinfo_validate
from portage.sync.syncbase import NewBase
from portage.util import writemsg, writemsg_level, writemsg_stdout
@@ -252,9 +253,7 @@ class RsyncSync(NewBase):
family = socket.AF_UNSPEC
if "-4" in all_rsync_opts or "--ipv4" in all_rsync_opts:
family = socket.AF_INET
- elif socket.has_ipv6 and (
- "-6" in all_rsync_opts or "--ipv6" in all_rsync_opts
- ):
+ elif has_ipv6() and ("-6" in all_rsync_opts or "--ipv6" in all_rsync_opts):
family = socket.AF_INET6
addrinfos = None
@@ -278,7 +277,7 @@ class RsyncSync(NewBase):
if addrinfos:
AF_INET = socket.AF_INET
AF_INET6 = None
- if socket.has_ipv6:
+ if has_ipv6():
AF_INET6 = socket.AF_INET6
ips_v4 = []