Add additional safety check
This commit is contained in:
parent
979698bad9
commit
140aa5005a
@ -4,6 +4,9 @@ import mwparserfromhell
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
def fix_inflection(template: mwparserfromhell.wikicode.Template):
|
def fix_inflection(template: mwparserfromhell.wikicode.Template):
|
||||||
|
if template.name not in ("inflection of", "infl of"):
|
||||||
|
print("Somehow encountered invalid template:", template.name)
|
||||||
|
|
||||||
for param in template.params:
|
for param in template.params:
|
||||||
param: mwparserfromhell.nodes.extras.Parameter
|
param: mwparserfromhell.nodes.extras.Parameter
|
||||||
if param.value == "sbjv":
|
if param.value == "sbjv":
|
||||||
|
Loading…
Reference in New Issue
Block a user