From 581eb066b970e408f14d1e8cb081d6078c8ba093 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 25 Jul 2018 18:38:57 +0000 Subject: [PATCH] [fix] Microdecision : dyndns update was broken if no IPv6 on the server --- src/yunohost/utils/network.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yunohost/utils/network.py b/src/yunohost/utils/network.py index 871b3e6d1..a9602ff56 100644 --- a/src/yunohost/utils/network.py +++ b/src/yunohost/utils/network.py @@ -36,7 +36,11 @@ def get_public_ip(protocol=4): else: raise ValueError("invalid protocol version") - return download_text(url, timeout=30).strip() + try: + return download_text(url, timeout=30).strip() + except Exception as e: + logger.debug("Could not get public IPv%s : %s" % (str(protocol), str(e))) + return None def get_network_interfaces():