Merge pull request #2149 from lissyx/fix-ll

Do not fail without --bogus-records
This commit is contained in:
lissyx 2019-06-05 16:11:31 +02:00 committed by GitHub
commit 35cbc16697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):