jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/518025 )
Change subject: [bugfix] Create APISite object through pywikibot.Site wrapper ......................................................................
[bugfix] Create APISite object through pywikibot.Site wrapper
Site function caches created sites in global _sites
Bug: T226157 Change-Id: Ie4e529aedd830dea894e08f0f9e50f6bc1080183 --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py index bef3935..24049dc 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -1885,7 +1885,7 @@ if site['dbname'] == dbname: if site['code'] == 'wiki': site['code'] = 'wikipedia' - return cls(lang, site['code']) + return pywikibot.Site(lang, site['code']) else: # key == 'specials' for site in val: if site['dbname'] == dbname:
pywikibot-commits@lists.wikimedia.org