Update to generate-domains-blocklist.py (#1412)

* ConfigFile change to allowlist and blocklist

* revised names and warnings

* consistent file naming in kebab case, and generic use of blocklist and allowlist in cmoments for clarity

* update ci files

* message about deprecation of -w

Co-authored-by: Ian Bashford <ianbashford@gmail.com>
This commit is contained in:
Ian Bashford 2020-09-01 22:05:25 +01:00 committed by GitHub
parent d175642df3
commit a510b97d86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -278,6 +278,11 @@ argp.add_argument(
)
argp.add_argument(
"-w",
"--whitelist",
help="Deprecated. Please use -a or --allowlist",
)
argp.add_argument(
"-a",
"--allowlist",
default="domains-allowlist.txt",
help="file containing a set of names to exclude from the blocklist",
@ -304,6 +309,11 @@ argp.add_argument("-t", "--timeout", default=30, help="URL open timeout")
args = argp.parse_args()
whitelist = args.whitelist
if whitelist:
print('Use of -w WHITELIST has been removed. Please use -a ALLOWLIST instead.')
exit(1)
conf = args.config
allowlist = args.allowlist
time_restricted = args.time_restricted