From 140aa5005ab972f405ee90219b8de7c059125355 Mon Sep 17 00:00:00 2001 From: Kiril Kovachev Date: Sun, 3 Sep 2023 23:57:10 +0100 Subject: [PATCH] Add additional safety check --- bulgarian-subject-object/bg-subject-object.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bulgarian-subject-object/bg-subject-object.py b/bulgarian-subject-object/bg-subject-object.py index 7d5d2e0..8936004 100644 --- a/bulgarian-subject-object/bg-subject-object.py +++ b/bulgarian-subject-object/bg-subject-object.py @@ -4,6 +4,9 @@ import mwparserfromhell import sys 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: param: mwparserfromhell.nodes.extras.Parameter if param.value == "sbjv":