jenkins-bot has submitted this change and it was merged. Change subject: [IMPR] Upcast PageGenerator to User Page subclass when namespace is 2 ......................................................................
[IMPR] Upcast PageGenerator to User Page subclass when namespace is 2 Change-Id: Ibe14a4acdbf0ea1e345c7e9e0654e302c1d6e528 --- M pywikibot/data/api.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py index a42caf6..1969c90 100644 --- a/pywikibot/data/api.py +++ b/pywikibot/data/api.py @@ -2863,7 +2863,9 @@ p = pywikibot.Page(self.site, pagedata['title'], pagedata['ns']) ns = pagedata['ns'] # Upcast to proper Page subclass. - if ns == 6: + if ns == 2: + p = pywikibot.User(p) + elif ns == 6: p = pywikibot.FilePage(p) elif ns == 14: p = pywikibot.Category(p) -- To view, visit https://gerrit.wikimedia.org/r/272684 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe14a4acdbf0ea1e345c7e9e0654e302c1d6e528 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Mpaa <mpaa.w...@gmail.com> Gerrit-Reviewer: XZise <commodorefabia...@gmx.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ Pywikibot-commits mailing list Pywikibot-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits