From 618c466b84d6cf00fa4bf5d3c36c94b7e5f0f950 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Sat, 23 Dec 2023 05:52:53 -0800 Subject: [PATCH] Fixed SIM114 (if-with-same-arms): Combine `if` branches using logical `or` operator --- management/status_checks.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/management/status_checks.py b/management/status_checks.py index 0f060100..cd3e9f28 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -678,9 +678,7 @@ def check_mail_domain(domain, env, output): recommended_mx = "10 " + env['PRIMARY_HOSTNAME'] mx = query_dns(domain, "MX", nxdomain=None) - if mx is None: - mxhost = None - elif mx == "[timeout]": + if mx is None or mx == "[timeout]": mxhost = None else: # query_dns returns a semicolon-delimited list