From a510b97d86fffbc73fdb26cb616b102e47ff9e39 Mon Sep 17 00:00:00 2001 From: Ian Bashford Date: Tue, 1 Sep 2020 22:05:25 +0100 Subject: [PATCH] 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 --- .../generate-domains-blocklist.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/utils/generate-domains-blocklists/generate-domains-blocklist.py b/utils/generate-domains-blocklists/generate-domains-blocklist.py index 58a347e1..3cd0cb6b 100755 --- a/utils/generate-domains-blocklists/generate-domains-blocklist.py +++ b/utils/generate-domains-blocklists/generate-domains-blocklist.py @@ -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