Xqt has submitted this change and it was merged.
Change subject: Set correct language as source ......................................................................
Set correct language as source
Patch is basically the same as d90be6a8765.
Bug: https://sourceforge.net/p/pywikipediabot/feature-requests/346/ Change-Id: Ic2a6010903a3586803687f350f95ce33fa6abbb2 --- M scripts/claimit.py 1 file changed, 5 insertions(+), 5 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/claimit.py b/scripts/claimit.py index 02bdf35..0f50db0 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -37,15 +37,15 @@ self.setSource(pywikibot.Site().language())
def setSource(self, lang): - ''' + """ Get the source - ''' + """ 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')