diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2019-06-13 16:33:11 +0300 |
---|---|---|
committer | Maksim Andrianov <maksimandrianov1@gmail.com> | 2019-06-13 16:34:55 +0300 |
commit | 615194d47653419d638bd0c235661e130e120229 (patch) | |
tree | 9377a8a37f7ed15ba2605d2cd198d6c84e77f6e9 /tools | |
parent | f1b3632042fe59b43fe45788bc62e662cdae1c1d (diff) |
[promo][generator] inject_promo_cities fix
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/maps_generator/maps_generator.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/python/maps_generator/maps_generator.py b/tools/python/maps_generator/maps_generator.py index 4a57f7e8be..9bb8bab254 100644 --- a/tools/python/maps_generator/maps_generator.py +++ b/tools/python/maps_generator/maps_generator.py @@ -237,11 +237,14 @@ def stage_countries_txt(env): env.countries_synonyms_path, env.hierarchy_path, env.mwm_path, env.mwm_version) - countries_json = json.loads(countries) - inject_promo_cities(countries_json, env.promo_catalog_cities_path, - env.mwm_path, env.types_path, env.mwm_path) + if env.is_accepted_stage(stage_download_production_external.__name__): + countries_json = json.loads(countries) + inject_promo_cities(countries_json, env.promo_catalog_cities_path, + env.mwm_path, env.types_path, env.mwm_path) + countries = json.dumps(countries_json, ensure_ascii=True, indent=1) + with open(env.counties_txt_path, "w") as f: - json.dump(countries_json, f, indent=1) + f.write(countries) @stage |