Skip to content

Commit 3f92933

Browse files
committed
Add noupdate option to makeHosts.py
1 parent 593bbe2 commit 3f92933

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

makeHosts.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,22 @@ def main():
8383
"file from hosts stored in "
8484
"data subfolders."
8585
)
86+
parser.add_argument(
87+
"--noupdate",
88+
"-n",
89+
dest="noupdate",
90+
default=False,
91+
action="store_true",
92+
help="Don't update from host data sources.",
93+
)
8694
parser.parse_args()
95+
options = vars(parser.parse_args())
8796

8897
# Update the unified hosts file
89-
update_hosts_file("-a")
98+
if options["noupdate"]:
99+
update_hosts_file("-a", "-n")
100+
else:
101+
update_hosts_file("-a")
90102

91103
# List of extensions we want to generate, we will loop over them recursively to prevent manual definitions
92104
# Only add new extensions to the end of the array, to avoid relocating existing hosts-files

0 commit comments

Comments
 (0)