mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-18 18:07:22 +01:00
Fixed C401 (unnecessary-generator-set): Unnecessary generator (rewrite as a set comprehension)
This commit is contained in:
committed by
Joshua Tauberer
parent
81a4da0181
commit
c953e5784d
@@ -361,8 +361,8 @@ def build_zone(domain, domain_properties, additional_records, env, is_zone=True)
|
||||
# non-mail domain and also may include qnames from custom DNS records.
|
||||
# Do this once at the end of generating a zone.
|
||||
if is_zone:
|
||||
qnames_with_a = set(qname for (qname, rtype, value, explanation) in records if rtype in {"A", "AAAA"})
|
||||
qnames_with_mx = set(qname for (qname, rtype, value, explanation) in records if rtype == "MX")
|
||||
qnames_with_a = {qname for (qname, rtype, value, explanation) in records if rtype in {"A", "AAAA"}}
|
||||
qnames_with_mx = {qname for (qname, rtype, value, explanation) in records if rtype == "MX"}
|
||||
for qname in qnames_with_a - qnames_with_mx:
|
||||
# Mark this domain as not sending mail with hard-fail SPF and DMARC records.
|
||||
d = (qname+"." if qname else "") + domain
|
||||
|
||||
Reference in New Issue
Block a user