From a89d7f71d7eef32fd97923331467dbc7ff1b20a7 Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 26 Jul 2016 20:34:31 -0400 Subject: [PATCH] [fix] if component name can't be mapped, return None --- scripts/geodata/osm/formatter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index dbd3f15f..7bcdbccb 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -406,6 +406,8 @@ class OSMAddressFormatter(object): containing_ids = [(b['type'], b['id']) for b in osm_components] component_name = osm_address_components.component_from_properties(country, tags, containing=containing_ids) + if component_name is None: + return (), None component_index = self.boundary_component_priorities.get(component_name) if component_index: