jenkins-bot has submitted this change and it was merged.
Change subject: (bug 66523) Do not break script when wikidata item does not exists. ......................................................................
(bug 66523) Do not break script when wikidata item does not exists.
Now we just ignore the given page.
Change-Id: I823fff01427d6559eadf1aef92d7c77e420aa72b --- M scripts/harvest_template.py 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index 263b838..a8ba023 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -119,6 +119,7 @@ if not item.exists(): pywikibot.output('%s doesn't have a wikidata item :(' % page) #TODO FIXME: We should provide an option to create the page + return item.get() if set(self.fields.values()) <= set(item.claims.keys()): pywikibot.output(u'%s item %s has claims for all properties. Skipping' % (page, item.title()))
pywikibot-commits@lists.wikimedia.org