dpla/ingestion — pull request #34 by no-reply (2014-09-25 21:59:43+00:00)
Title: Better error handling for Geocoder enrich calls

This patches two bugs in the Geonames Geocoder:

- Assumed geonames always returns an `fcode`. Now uses dict.get() to
allow for variability in geonames results.
- A bug in nested for loops caused continued operations on a place key
after it had been removed in merge_related. This removes that conflict
and better optimizes the nested loops.

This also introduces better error handling and logging for
Place.enrich_place, allowing for soft failover should of one Geocoder
error out.