[fix] language None for ambiguous case

This commit is contained in:
Al
2016-07-28 02:48:45 -04:00
parent db51cc91c2
commit fc118acd90

View File

@@ -509,7 +509,7 @@ class OSMAddressFormatter(object):
language_suffix=language_suffix,
drop_duplicate_city_names=False)
if random.random() < cldr_country_prob and AddressFormatter.COUNTRY in address_components:
address_country = self.components.cldr_country_name(country, language)
address_country = self.components.cldr_country_name(country, None)
if address_country:
address_components[AddressFormatter.COUNTRY] = address_country