git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
8ded82c
)
We can now use a "pause" key in update.json to pause updates from specific sources.
author
Steven Black
<redacted>
Fri, 13 May 2022 16:20:37 +0000
(12:20 -0400)
committer
Steven Black
<redacted>
Fri, 13 May 2022 16:20:37 +0000
(12:20 -0400)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 670e6ca1a8078413966a176b81aa8b7036427e3c..fb71194439babfad7ee3f112d970b2f026c4cbcf 100644
(file)
--- 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"):
git clone https://git.99rst.org/PROJECT