mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
Patch response checking in promptForFlushDnsCache
Previously, it was checking if query_yes_no returned False, which does not happen, as the function only returns "yes" or "no". As a result, the check was always returning True, even when the user did not want to flush the DNS cache.
This commit is contained in:
parent
a5a2bdf32c
commit
bdce1217bb
@ -191,11 +191,13 @@ def promptForMoreCustomExclusions(question="Do you have more domains you want to
|
||||
|
||||
|
||||
def promptForFlushDnsCache():
|
||||
if settings['auto']:
|
||||
if settings['flushdnscache']:
|
||||
flushDnsCache()
|
||||
else:
|
||||
if settings['flushdnscache'] or query_yes_no("Attempt to flush the DNS cache?"):
|
||||
if settings["flushdnscache"]:
|
||||
flushDnsCache()
|
||||
|
||||
if not settings["auto"]:
|
||||
response = query_yes_no("Attempt to flush the DNS cache?")
|
||||
|
||||
if response == "yes":
|
||||
flushDnsCache()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user