[addresses] Removing temporary file list and allowing any file ending in .yaml in resources/addresses to be parsed/imported
This commit is contained in:
@@ -26,9 +26,8 @@ class AddressConfig(object):
|
|||||||
self.cache = {}
|
self.cache = {}
|
||||||
|
|
||||||
for filename in os.listdir(config_dir):
|
for filename in os.listdir(config_dir):
|
||||||
if filename not in ('en.yaml', 'es.yaml', 'ca.yaml', 'fr.yaml', 'de.yaml', 'nl.yaml', 'da.yaml', 'nb.yaml', 'sv.yaml', 'pt.yaml', 'pl.yaml', 'ru.yaml', 'cs.yaml', 'sk.yaml', 'it.yaml', 'et.yaml', 'fi.yaml', 'ro.yaml', 'hu.yaml'):
|
if not filename.endswith('.yaml'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
config = yaml.load(open(os.path.join(ADDRESS_CONFIG_DIR, filename)))
|
config = yaml.load(open(os.path.join(ADDRESS_CONFIG_DIR, filename)))
|
||||||
countries = config.pop('countries', {})
|
countries = config.pop('countries', {})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user