Ladsgroup has uploaded a new change for review.
https://gerrit.wikimedia.org/r/181195
Change subject: Temp. workaround for Bug: T77971
......................................................................
Temp. workaround for Bug: T77971
redirect.py should fix wikibase redirects as well as other redirects
But currently it crashes when catches a double wikibase redirect and stops
With this CS it skips them, so it can work on other namespaces in
Wikibase repos like Wikidata.
Change-Id: Ie2b8d26b3235c8cbaf5056dc97ed5571fd4373ee
---
M scripts/redirect.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/95/181195/1
diff --git a/scripts/redirect.py b/scripts/redirect.py
index d172db0..9c6ef51 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -643,6 +643,9 @@
except pywikibot.BadTitle:
pywikibot.output(u"Bad Title Error")
break
+ if not self.site.redirectRegex().search(oldText):
+ pywikibot.output(u"Couldn't find the redirect link")
+ break
oldlink = self.site.redirectRegex().search(oldText).group(1)
if "#" in oldlink and targetPage.section() is None:
sectionlink = oldlink[oldlink.index("#"):]
--
To view, visit https://gerrit.wikimedia.org/r/181195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2b8d26b3235c8cbaf5056dc97ed5571fd4373ee
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits