From: Steven Black Date: Fri, 13 May 2022 16:20:37 +0000 (-0400) Subject: We can now use a "pause" key in update.json to pause updates from specific sources. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=0677b534b17005943694c869426ca3b97bd0a46b;p=stevenblack-hosts.git We can now use a "pause" key in update.json to pause updates from specific sources. --- diff --git a/updateHostsFile.py b/updateHostsFile.py index 670e6ca1a..fb7119443 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -738,6 +738,12 @@ def update_all_sources(source_data_filename, host_filename): update_file = open(source, "r", encoding="UTF-8") update_data = json.load(update_file) update_file.close() + + # we can pause updating any given hosts source. + # if the update.json "pause" key is missing, don't pause. + if update_data.get('pause', False): + continue + update_url = update_data["url"] update_transforms = [] if update_data.get("transforms"):