jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/729498 )
Change subject: [bugfix] Ignore InvalidTitleError in CommonscatBot.findCommonscatLink ......................................................................
[bugfix] Ignore InvalidTitleError in CommonscatBot.findCommonscatLink
Bug: T291783 Change-Id: I0c18a0895ca246bba8f536880c344cf151ea4f8e --- M scripts/commonscat.py 1 file changed, 7 insertions(+), 1 deletion(-)
Approvals: Meno25: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 121ae81..4cef4a3 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -369,7 +369,13 @@ for ipageLink in page.langlinks(): ipage = pywikibot.page.Page(ipageLink) pywikibot.log('Looking for template on ' + ipage.title()) - if (not ipage.exists() or ipage.isRedirectPage() + try: # T291783 + ipage_exists = ipage.exists() + except InvalidTitleError: + pywikibot.exception() + continue + + if (not ipage_exists or ipage.isRedirectPage() or ipage.isDisambig()): continue
pywikibot-commits@lists.wikimedia.org