From 9660b5786484172bd42c7fac332aa500fdc1790f Mon Sep 17 00:00:00 2001 From: Martin André Date: Fri, 2 Sep 2016 09:56:56 +0200 Subject: Consistently set sys path when using local tools Consistently set 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. TrivialFix Change-Id: Idd1d98bb82a8f1ddb32d1bdb23f346b461534b9f --- kolla/image/build.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'kolla/image') diff --git a/kolla/image/build.py b/kolla/image/build.py index 6c8aa857e..8b2a1943d 100644 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -38,13 +38,11 @@ from oslo_config import cfg from requests import exceptions as requests_exc import six - +# 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__)), '../..')) - -# NOTE(SamYaple): Update the search patch to prefer PROJECT_ROOT as the source -# of packages to import if we are using local tools/build.py -# instead of pip installed kolla-build tool if PROJECT_ROOT not in sys.path: sys.path.insert(0, PROJECT_ROOT) -- cgit v1.2.3