From 9754e78f207e9fbd1a6a9bf4c4984c7e06ae628a Mon Sep 17 00:00:00 2001 From: dkoao Date: Thu, 26 Sep 2019 10:24:40 +0000 Subject: [PATCH] replace two if statements with one --- management/dns_update.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/management/dns_update.py b/management/dns_update.py index 3578fcc2..a1fd6b33 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -281,10 +281,9 @@ def build_zone(domain, all_domains, additional_records, www_redirect_domains, en if not has_rec(dmarc_qname, "TXT", prefix="v=DMARC1; "): records.append((dmarc_qname, "TXT", 'v=DMARC1; p=reject', "Recommended. Prevents use of this domain name for outbound mail by specifying that the SPF rule should be honoured for mail from @%s." % (qname + "." + domain))) - if environ.get('DISABLE_NEXTCLOUD') != '0': + if environ.get('DISABLE_NEXTCLOUD') != '0' and domain != env["PRIMARY_HOSTNAME"]: # Add CardDAV/CalDAV SRV records on the non-primary hostname that points to the primary hostname. # The SRV record format is priority (0, whatever), weight (0, whatever), port, service provider hostname (w/ trailing dot). - if domain != env["PRIMARY_HOSTNAME"]: for dav in ("card", "cal"): qname = "_" + dav + "davs._tcp" if not has_rec(qname, "SRV"):