John Vandenberg has submitted this change and it was merged.
Change subject: Bug 72527 - CircularRedirect exception throws another exception
......................................................................
Bug 72527 - CircularRedirect exception throws another exception
CircularRedirect needs a page as input param.
Change-Id: I65cc58a1568b922336fcf5c85651cdc4172444d2
---
M pywikibot/site.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Verified
XZise: Looks good to me, approved
Mpaa: Looks good to me, approved
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 17611ee..86de719 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2344,7 +2344,7 @@
target_title = u'%(title)s%(section)s' % redirmap[title]
if target_title == title or "pages" not in result['query']:
# no "pages" element indicates a circular redirect
- raise pywikibot.CircularRedirect(target_title)
+ raise pywikibot.CircularRedirect(page)
pagedata = list(result['query']['pages'].values())[0]
# there should be only one value in 'pages', and it is the target
if self.sametitle(pagedata['title'], target_title):
--
To view, visit
https://gerrit.wikimedia.org/r/168837
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I65cc58a1568b922336fcf5c85651cdc4172444d2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>