Handle the auto flag in promptForFlushDnsCache
authorcryzed <redacted>
Mon, 13 Jun 2016 00:13:36 +0000 (02:13 +0200)
committercryzed <redacted>
Mon, 13 Jun 2016 00:13:36 +0000 (02:13 +0200)
updateHostsFile.py

index 3332a320e0f008c0ed0af904d3a0a343255a606a..82c73fa9631a2ecd674d7e72f7ea724f153345d0 100644 (file)
@@ -177,8 +177,12 @@ def promptForMoreCustomExclusions(question="Do you have more domains you want to
 
 
 def promptForFlushDnsCache():
-    if settings['flushdnscache'] or query_yes_no("Attempt to flush the DNS cache?"):
-        flushDnsCache()
+    if settings['auto']:
+        if settings['flushdnscache']:
+            flushDnsCache()
+    else:
+        if settings['flushdnscache'] or query_yes_no("Attempt to flush the DNS cache?"):
+            flushDnsCache()
 
 
 def promptForMove(finalFile):
git clone https://git.99rst.org/PROJECT