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:
--
To view, visit https://gerrit.wikimedia.org/r/152802
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia51ce1e1f892e1fe70312627c05be9124b34dfab
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits