jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Ignore invalid titles ......................................................................
[FIX] Ignore invalid titles
Previously it ignored invalid template titles like parser functions but not when the error occured in the constructor.
Change-Id: Ibcb011848821fa2392965709771cee7737e67a95 --- M pywikibot/page.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Xqt: Looks good to me, approved Steinsplitter: Looks good to me, but someone else must approve jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index f088d82..1eaf51a 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -1875,13 +1875,14 @@ # element into a list in the format used by old scripts result = [] for template in templates: - link = pywikibot.Link(template[0], self.site, - defaultNamespace=10) try: + link = pywikibot.Link(template[0], self.site, + defaultNamespace=10) if link.canonical_title() not in titles: continue except pywikibot.Error: # this is a parser function or magic word, not template name + # the template name might also contain invalid parts continue args = template[1] intkeys = {}
pywikibot-commits@lists.wikimedia.org