mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Clarify conditions
This commit is contained in:
parent
029c3b7686
commit
f4b396219c
3 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ class MyDiagnoser(Diagnoser):
|
||||||
|
|
||||||
ipversions = []
|
ipversions = []
|
||||||
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
|
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
|
||||||
if ipv4.get("status") == "SUCCESS" or not settings_get("dns_exposure") == "ipv6":
|
if ipv4.get("status") == "SUCCESS" or settings_get("dns_exposure") != "ipv6":
|
||||||
ipversions.append(4)
|
ipversions.append(4)
|
||||||
|
|
||||||
# To be discussed: we could also make this check dependent on the
|
# To be discussed: we could also make this check dependent on the
|
||||||
|
@ -121,7 +121,7 @@ class MyDiagnoser(Diagnoser):
|
||||||
for record in dnsrecords.get("items", [])
|
for record in dnsrecords.get("items", [])
|
||||||
)
|
)
|
||||||
|
|
||||||
if failed == 4 and not settings_get("dns_exposure") == "ipv6" or ipv6_is_important():
|
if failed == 4 and settings_get("dns_exposure") != "ipv6" or ipv6_is_important():
|
||||||
yield dict(
|
yield dict(
|
||||||
meta={"port": port},
|
meta={"port": port},
|
||||||
data={
|
data={
|
||||||
|
|
|
@ -77,7 +77,7 @@ class MyDiagnoser(Diagnoser):
|
||||||
|
|
||||||
ipversions = []
|
ipversions = []
|
||||||
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
|
ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {}
|
||||||
if ipv4.get("status") == "SUCCESS" and not settings_get("dns_exposure") == "ipv6":
|
if ipv4.get("status") == "SUCCESS" and settings_get("dns_exposure") != "ipv6":
|
||||||
ipversions.append(4)
|
ipversions.append(4)
|
||||||
|
|
||||||
# To be discussed: we could also make this check dependent on the
|
# To be discussed: we could also make this check dependent on the
|
||||||
|
|
|
@ -186,7 +186,7 @@ def _build_dns_conf(base_domain, include_empty_AAAA_if_no_ipv6=False):
|
||||||
###########################
|
###########################
|
||||||
# Basic ipv4/ipv6 records #
|
# Basic ipv4/ipv6 records #
|
||||||
###########################
|
###########################
|
||||||
if ipv4 and not settings_get("dns_exposure") == "ipv6":
|
if ipv4 and settings_get("dns_exposure") != "ipv6":
|
||||||
basic.append([basename, ttl, "A", ipv4])
|
basic.append([basename, ttl, "A", ipv4])
|
||||||
|
|
||||||
if ipv6:
|
if ipv6:
|
||||||
|
|
Loading…
Add table
Reference in a new issue