updateHostsFile.py: DEL whitespace after '['
authorFadeMind <redacted>
Sat, 3 Mar 2018 14:30:49 +0000 (15:30 +0100)
committerGitHub <redacted>
Sat, 3 Mar 2018 14:30:49 +0000 (15:30 +0100)
https://travis-ci.org/StevenBlack/hosts/jobs/346915934#L606-L609

updateHostsFile.py

index 2b9cc5cbf6d2c0ce3764958d7c1ed3b8839c3788..ce838d84d153be8fe421e4168391bb5f86bc2d8e 100644 (file)
@@ -1052,7 +1052,7 @@ def flush_dns_cache():
             if os.path.isfile(nscd_cache):
                 dns_cache_found = True
 
-                if subprocess.call(SUDO + [ nscd_cache, "restart"]):
+                if subprocess.call(SUDO + [nscd_cache, "restart"]):
                     print_failure(nscd_msg.format(result="failed"))
                 else:
                     print_success(nscd_msg.format(result="succeeded"))
@@ -1073,7 +1073,7 @@ def flush_dns_cache():
                 if os.path.isfile(service_file):
                     dns_cache_found = True
 
-                    if subprocess.call(SUDO + [ systemctl, "restart", service]):
+                    if subprocess.call(SUDO + [systemctl, "restart", service]):
                         print_failure(service_msg.format(result="failed"))
                     else:
                         print_success(service_msg.format(result="succeeded"))
@@ -1085,7 +1085,7 @@ def flush_dns_cache():
         if os.path.isfile(dns_clean_file):
             dns_cache_found = True
 
-            if subprocess.call(SUDO + [ dns_clean_file, "start"]):
+            if subprocess.call(SUDO + [dns_clean_file, "start"]):
                 print_failure(dns_clean_msg.format(result="failed"))
             else:
                 print_success(dns_clean_msg.format(result="succeeded"))
git clone https://git.99rst.org/PROJECT