diff --git a/src/yunohost/dyndns.py b/src/yunohost/dyndns.py index 8c4efd777..ec3bf88c8 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 902d99278..9cdbc676c 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) -