mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-07 13:02:27 +02:00
We can now use a "pause" key in update.json to pause updates from specific sources.
This commit is contained in:
parent
8ded82cd4d
commit
0677b534b1
@ -738,6 +738,12 @@ def update_all_sources(source_data_filename, host_filename):
|
|||||||
update_file = open(source, "r", encoding="UTF-8")
|
update_file = open(source, "r", encoding="UTF-8")
|
||||||
update_data = json.load(update_file)
|
update_data = json.load(update_file)
|
||||||
update_file.close()
|
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_url = update_data["url"]
|
||||||
update_transforms = []
|
update_transforms = []
|
||||||
if update_data.get("transforms"):
|
if update_data.get("transforms"):
|
||||||
|
Loading…
Reference in New Issue
Block a user