everypolitician / wikidata-fetcher

Fetch information useful to EveryPolitician from Wikidata
MIT License
4 stars 2 forks source link

Make sure non-human items are properly skipped #26

Closed mhl closed 8 years ago

mhl commented 8 years ago

Fetcher.data sometimes returns nil if it encounters an item which isn't an instance of a class with type 'human'; the error message in this situation says "Skipping", but the way a nil return value is handled means that the scraper aborts with an exception.

This commit changes the behaviour of the calling code, so that when Fetcher.data returns nil, it carries on to the next item.

tmtmtmtm commented 8 years ago

👍