wmllint: don't quit when finding a mask= key not referencing a .mask file

Fixes #5324
This commit is contained in:
Elvish_Hunter 2020-12-03 21:01:15 +01:00
parent 5e4ba6c01b
commit a5207027fe

View file

@ -2777,9 +2777,8 @@ def translator(filename, mapxforms, textxform):
if refname == refname.upper():
pass
elif 'mask=' in line and not (refname.endswith("}") or refname.endswith(".mask")):
print('"%s", line %d: fatal error, mask file without .mask extension (%s)' \
print('"%s", line %d: mask file without .mask extension or not a mask file (%s)' \
% (filename, lineno+1, refname))
sys.exit(1)
# Exclude map_data= lines that are just 1 line without
# continuation, or which contain {}. The former are
# pathological and the parse won't handle them, the latter