mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Microdecision : dyndns update was broken if no IPv6 on the server
This commit is contained in:
parent
0b86ae0467
commit
581eb066b9
1 changed files with 5 additions and 1 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Reference in a new issue