[countries] take first encountered country code instead of reversing the components (for cases like Puerto Rico, Hong Kong, etc.)

This commit is contained in:
Al
2016-11-22 11:55:41 -05:00
parent ee8c070fd5
commit ee6edbbd91

View File

@@ -479,7 +479,7 @@ class OSMCountryReverseGeocoder(OSMReverseGeocoder):
@classmethod
def country_and_languages_from_components(cls, osm_components):
country = None
for c in reversed(osm_components):
for c in osm_components:
country = c.get('ISO3166-1:alpha2')
if country:
break