jenkins-bot has submitted this change and it was merged.
Change subject: Fix bug 1659: set correct language as source ......................................................................
Fix bug 1659: set correct language as source
Because the variable 'lang' was used for two different meanings, the saved language was whatever was read last from the json configuration.
Change-Id: I2abd7311f6d534f71ffdbec44c80138966d70e1c --- M scripts/harvest_template.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index c78b97a..05a9c52 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -55,8 +55,8 @@ page = pywikibot.Page(self.repo, 'Wikidata:List of wikis/python') source_values = json.loads(page.get()) source_values = source_values['wikipedia'] - for lang in source_values: - source_values[lang] = pywikibot.ItemPage(self.repo, source_values[lang]) + for source_lang in source_values: + source_values[source_lang] = pywikibot.ItemPage(self.repo, source_values[source_lang])
if lang in source_values: self.source = pywikibot.Claim(self.repo, 'p143')
pywikibot-commits@lists.wikimedia.org