jenkins-bot has submitted this change and it was merged.
Change subject: Site.code is to be used in core instead of Site.lang ......................................................................
Site.code is to be used in core instead of Site.lang
- We must use the site code instead of the language code as key. - Use core-like Page.text instead of page.get(True)
Change-Id: Ia51ce1e1f892e1fe70312627c05be9124b34dfab --- M scripts/clean_sandbox.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py index 6939777..6bfaecc 100755 --- a/scripts/clean_sandbox.py +++ b/scripts/clean_sandbox.py @@ -164,10 +164,10 @@ user_sandboxTemplate) localSandbox = pywikibot.Page(self.site, localSandboxTitle) content.update(user_content) - sandboxTitle[self.site.lang] = [item.title() for item in + sandboxTitle[self.site.code] = [item.title() for item in localSandbox.getReferences( onlyTemplateInclusion=True)] - if self.site.lang not in user_sandboxTemplate: + if self.site.code not in user_sandboxTemplate: content[self.site.code] = None pywikibot.output( u'Not properly set-up to run in user namespace!') @@ -198,7 +198,7 @@ u'%s is a redirect page, cleaning it anyway' % sandboxPage.title(asLink=True)) try: - text = sandboxPage.get(get_redirect=True) + text = sandboxPage.text if not self.getOption('text'): translatedContent = i18n.translate(self.site, content) else:
pywikibot-commits@lists.wikimedia.org