From e2c061ee63a701284bc2f6b1470d9d33a58e724c Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 6 Oct 2022 13:10:51 +0200 Subject: do not play with PROJECT_ROOT in build.py PROJECT_ROOT mangling is already done in kolla/cmd/build.py (which is called as 'kolla-build' or 'tools/build.py' or directly) so it is not needed here. Now we can sort imports and drop not needed ones. Change-Id: Iac6ea537491e5c00ce6fb4b4e8f07a9124e9fa8b --- kolla/image/build.py | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/kolla/image/build.py b/kolla/image/build.py index 23f818179..a55fe266b 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -15,35 +15,20 @@ import contextlib import json import logging -import os import queue import shutil import sys import threading import time +from kolla.common import config as common_config +from kolla.common import utils +from kolla.image.kolla_worker import KollaWorker +from kolla.image.utils import LOG +from kolla.image.utils import Status from oslo_config import cfg -# NOTE(SamYaple): Update the search path to prefer PROJECT_ROOT as the source -# of packages to import if we are using local tools instead of -# pip installed kolla tools -PROJECT_ROOT = os.path.abspath(os.path.join( - os.path.dirname(os.path.realpath(__file__)), '../..')) -if PROJECT_ROOT not in sys.path: - sys.path.insert(0, PROJECT_ROOT) - -from kolla.common import config as common_config # noqa -from kolla.common import utils # noqa -from kolla.image.kolla_worker import KollaWorker # noqa -from kolla.image.utils import LOG # noqa -from kolla.image.utils import Status # noqa -from kolla import exception # noqa -from kolla.template import filters as jinja_filters # noqa -from kolla.template import methods as jinja_methods # noqa -from kolla import version # noqa - - @contextlib.contextmanager def join_many(threads): try: -- cgit v1.2.3