mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Use a .get() here to avoid crashing if key doesn't exist
This commit is contained in:
parent
a1cba8b6fa
commit
1f1b233839
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ class PortsDiagnoser(Diagnoser):
|
|||
# If any AAAA record is set, IPv6 is important...
|
||||
def ipv6_is_important():
|
||||
dnsrecords = Diagnoser.get_cached_report("dnsrecords") or {}
|
||||
return any(record["data"]["AAAA:@"] in ["OK", "WRONG"] for record in dnsrecords.get("items", []))
|
||||
return any(record["data"].get("AAAA:@") in ["OK", "WRONG"] for record in dnsrecords.get("items", []))
|
||||
|
||||
if failed == 4 or ipv6_is_important():
|
||||
yield dict(meta={"port": port},
|
||||
|
|
Loading…
Add table
Reference in a new issue