jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/322398 )
Change subject: Workaround for T111513 ......................................................................
Workaround for T111513
It is wasteful to interrupt the bot just because of an unsupported interwiki link. Here, we only test if it *is* an interwiki link, then we skip it whatever syntax it has. This error only confirms that.
Bug: T136280 Change-Id: If013e15e4282fd29ef6f0f81e8c6f984d7fde70e --- M pywikibot/cosmetic_changes.py 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py index 6f4bfac..0e52a83 100755 --- a/pywikibot/cosmetic_changes.py +++ b/pywikibot/cosmetic_changes.py @@ -450,7 +450,12 @@ trailingChars = match.group('linktrail') newline = match.group('newline')
- if not self.site.isInterwikiLink(titleWithSection): + try: + is_interwiki = self.site.isInterwikiLink(titleWithSection) + except ValueError: # T111513 + is_interwiki = True + + if not is_interwiki: # The link looks like this: # [[page_title|link_text]]trailing_chars # We only work on namespace 0 because pipes and linktrails work
pywikibot-commits@lists.wikimedia.org