mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix
This commit is contained in:
parent
988ee54de4
commit
66a3adccba
1 changed files with 4 additions and 2 deletions
|
@ -214,14 +214,16 @@ class MyDiagnoser(Diagnoser):
|
||||||
protocol
|
protocol
|
||||||
)
|
)
|
||||||
|
|
||||||
ip_url_yunohost_tab = ["https://ip%s.yunohost.org" % (protocol if protocol != 4 else ""), "https://0-ip%s.yunohost.org" % (protocol if protocol != 4 else "")]
|
ip4_tab = ["https://ip.yunohost.org","https://api.ipify.net"]
|
||||||
|
ip6_tab = ["https://ip6.yunohost.org"]
|
||||||
|
ip_url_yunohost_tab = ip4_tab if protocol==4 else ip6_tab
|
||||||
|
|
||||||
# Check URLS
|
# Check URLS
|
||||||
for url in ip_url_yunohost_tab:
|
for url in ip_url_yunohost_tab:
|
||||||
try:
|
try:
|
||||||
return download_text(url, timeout=10).strip()
|
return download_text(url, timeout=10).strip()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger_debug(
|
logger.debug(
|
||||||
"Could not get public IPv%s from %s : %s" % (str(protocol), url, str(e))
|
"Could not get public IPv%s from %s : %s" % (str(protocol), url, str(e))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue