jenkins-bot has submitted this change and it was merged.
Change subject: (bugfix) the option is "-lists" and its task name is
"lists"
......................................................................
(bugfix) the option is "-lists" and its task name is "lists"
- bugfix for task name
- evaluate the dict from task name
Change-Id: Iec11bd91e44ac4e86847783d8a8687987d48b069
---
M scripts/featured.py
1 file changed, 4 insertions(+), 11 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/featured.py b/scripts/featured.py
index a056a40..07dd683 100644
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -343,18 +343,11 @@
self.featuredWithInterwiki(fromsite, task)
def featuredArticles(self, site, task, cache):
- code = site.lang
articles = []
- if task == 'good':
- info = good_name
- code = 'wikidata'
- elif task == 'former':
- info = former_name
- code = 'wikidata'
- elif task == 'list':
- info = lists_name
+ info = globals()[task + '_name']
+ if task == 'lists':
+ code = site.code
else:
- info = featured_name
code = 'wikidata'
try:
method = info[code][0]
@@ -487,7 +480,7 @@
remove_templates += template['_default']
except KeyError:
remove_templates = template['_default']
- elif task == 'list':
+ elif task == 'lists':
try:
add_templates = template_lists[lang]
add_templates += template_lists['_default']
--
To view, visit
https://gerrit.wikimedia.org/r/137288
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iec11bd91e44ac4e86847783d8a8687987d48b069
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Pyfisch <pyfisch(a)gmail.com>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>