Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2021-03-05 12:59:56 +0300
committerTatiana Yan <tatiana.kondakova@gmail.com>2021-03-05 20:32:11 +0300
commite2aee58abf373010263ad61da26bda84bdc5eefe (patch)
tree8ffcdc2cabb3435dd5c005f6b1dc918034e51f3f
parent9d13ad7725cbeaeb6cb27983c9abd0fceab20e0c (diff)
[generator][python] Changed init of stages place; changed logger in step_prepare_routing_world
-rw-r--r--tools/python/maps_generator/__init__.py5
-rw-r--r--tools/python/maps_generator/generator/stages_declaration.py3
-rw-r--r--tools/python/maps_generator/generator/steps.py6
3 files changed, 9 insertions, 5 deletions
diff --git a/tools/python/maps_generator/__init__.py b/tools/python/maps_generator/__init__.py
index 36264c942c..cc25c0e777 100644
--- a/tools/python/maps_generator/__init__.py
+++ b/tools/python/maps_generator/__init__.py
@@ -10,3 +10,8 @@ CONFIG_PATH = os.path.join(
)
settings.init(CONFIG_PATH)
+
+from maps_generator.generator import stages_declaration
+from maps_generator.generator.stages import stages
+
+stages.init()
diff --git a/tools/python/maps_generator/generator/stages_declaration.py b/tools/python/maps_generator/generator/stages_declaration.py
index d1aa76ae8b..324168d3f4 100644
--- a/tools/python/maps_generator/generator/stages_declaration.py
+++ b/tools/python/maps_generator/generator/stages_declaration.py
@@ -39,7 +39,6 @@ from maps_generator.generator.stages import helper_stage_for
from maps_generator.generator.stages import mwm_stage
from maps_generator.generator.stages import outer_stage
from maps_generator.generator.stages import production_only
-from maps_generator.generator.stages import stages
from maps_generator.generator.stages import test_stage
from maps_generator.generator.statistics import get_stages_info
from maps_generator.utils.file import download_files
@@ -435,5 +434,3 @@ class StageCleanup(Stage):
logger.info(f"{env.paths.draft_path} will be removed.")
shutil.rmtree(env.paths.draft_path)
-
-stages.init()
diff --git a/tools/python/maps_generator/generator/steps.py b/tools/python/maps_generator/generator/steps.py
index 486a46c8f5..ceb27a79d2 100644
--- a/tools/python/maps_generator/generator/steps.py
+++ b/tools/python/maps_generator/generator/steps.py
@@ -225,6 +225,7 @@ def make_world_road_graph(
path_roads_file,
path_resources,
path_res_file,
+ logger,
output=subprocess.DEVNULL,
error=subprocess.DEVNULL,
):
@@ -242,7 +243,7 @@ def make_world_road_graph(
wait_and_raise_if_fail(world_roads_builder_tool)
-def step_prepare_routing_world(env: Env, country: AnyStr, **kwargs):
+def step_prepare_routing_world(env: Env, country: AnyStr, logger, **kwargs):
filter_roads(
env[settings.OSM_TOOL_FILTER],
env.paths.planet_o5m,
@@ -255,8 +256,9 @@ def step_prepare_routing_world(env: Env, country: AnyStr, **kwargs):
env.paths.world_roads_o5m,
env.paths.user_resource_path,
env.paths.world_roads_path,
+ logger,
env.get_subprocess_out(country),
- env.get_subprocess_out(country),
+ env.get_subprocess_out(country)
)