build_shapes: Fix pycountry API change (fixes #1)

See also
72b1927b3c
This commit is contained in:
Jonas Hoersch 2019-02-07 13:03:18 +01:00
parent d57df6b0c8
commit 3e11d569d0

View File

@ -15,7 +15,7 @@ def _get_country(target, **keys):
assert len(keys) == 1
try:
return getattr(pyc.countries.get(**keys), target)
except KeyError:
except (KeyError, AttributeError):
return np.nan
def _simplify_polys(polys, minarea=0.1, tolerance=0.01, filterremote=True):