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):
pywikibot-commits@lists.wikimedia.org