Do not fail without --bogus-records

This commit is contained in:
Alexandre Lissy 2019-06-05 15:29:19 +02:00 committed by Alexandre Lissy
parent 8174f3f6db
commit 32a73b7224

View File

@ -187,8 +187,9 @@ if __name__ == "__main__":
ALPHABET = Alphabet(CLI_ARGS.filter_alphabet) if CLI_ARGS.filter_alphabet else None
bogus_regexes = []
for line in CLI_ARGS.bogus_records:
bogus_regexes.append(re.compile(line.strip()))
if CLI_ARGS.bogus_records:
for line in CLI_ARGS.bogus_records:
bogus_regexes.append(re.compile(line.strip()))
def record_filter(path):
if any(regex.match(path) for regex in bogus_regexes):