From f5b5edb3bb598ff401a58714a48a1c8647b4ef9c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Jan 2018 03:41:34 +0100 Subject: [PATCH] This get_public_ips isn't really relevant anymore --- src/yunohost/dyndns.py | 5 +++-- src/yunohost/utils/network.py | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/yunohost/dyndns.py b/src/yunohost/dyndns.py index 8c4efd77..ec3bf88c 100644 --- a/src/yunohost/dyndns.py +++ b/src/yunohost/dyndns.py @@ -40,7 +40,7 @@ from moulinette.utils.filesystem import read_file, write_to_file, rm from moulinette.utils.network import download_json from yunohost.domain import _get_maindomain, _build_dns_conf -from yunohost.utils.network import get_public_ips +from yunohost.utils.network import get_public_ip logger = getActionLogger('yunohost.dyndns') @@ -194,7 +194,8 @@ def dyndns_update(dyn_host="dyndns.yunohost.org", domain=None, key=None, old_ipv6 = read_file(OLD_IPV6_FILE).rstrip() # Get current IPv4 and IPv6 - (ipv4_, ipv6_) = get_public_ips() + ipv4_ = get_public_ip() + ipv6_ = get_public_ip(6) if ipv4 is None: ipv4 = ipv4_ diff --git a/src/yunohost/utils/network.py b/src/yunohost/utils/network.py index 902d9927..9cdbc676 100644 --- a/src/yunohost/utils/network.py +++ b/src/yunohost/utils/network.py @@ -38,11 +38,3 @@ def get_public_ip(protocol=4): except IOError: return None - -def get_public_ips(): - - ipv4 = get_public_ip() - ipv6 = get_public_ip(6) - - return (ipv4, ipv6) -