[CI] Format code

This commit is contained in:
yunohost-bot 2021-08-26 20:09:57 +00:00
parent aac0146aef
commit aac8b8d460
3 changed files with 11 additions and 5 deletions

View file

@ -30,9 +30,14 @@ class DNSRecordsDiagnoser(Diagnoser):
for domain in all_domains:
self.logger_debug("Diagnosing DNS conf for %s" % domain)
is_subdomain = domain.split(".", 1)[1] in all_domains
is_specialusedomain = any(domain.endswith("." + tld) for tld in SPECIAL_USE_TLDS)
is_specialusedomain = any(
domain.endswith("." + tld) for tld in SPECIAL_USE_TLDS
)
for report in self.check_domain(
domain, domain == main_domain, is_subdomain=is_subdomain, is_specialusedomain=is_specialusedomain
domain,
domain == main_domain,
is_subdomain=is_subdomain,
is_specialusedomain=is_specialusedomain,
):
yield report
@ -70,7 +75,6 @@ class DNSRecordsDiagnoser(Diagnoser):
summary="diagnosis_dns_specialusedomain",
)
for category in categories:
records = expected_configuration[category]

View file

@ -34,7 +34,7 @@ class WebDiagnoser(Diagnoser):
summary="diagnosis_http_nginx_conf_not_up_to_date",
details=["diagnosis_http_nginx_conf_not_up_to_date_details"],
)
elif domain.endswith('.local'):
elif domain.endswith(".local"):
yield dict(
meta={"domain": domain},
status="INFO",

View file

@ -166,7 +166,9 @@ def domain_add(operation_logger, domain, dyndns=False):
# because it's one of the major service, but in the long term we
# should identify the root of this bug...
_force_clear_hashes(["/etc/nginx/conf.d/%s.conf" % domain])
regen_conf(names=["nginx", "metronome", "dnsmasq", "postfix", "rspamd", "mdns"])
regen_conf(
names=["nginx", "metronome", "dnsmasq", "postfix", "rspamd", "mdns"]
)
app_ssowatconf()
except Exception as e: