aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
authorRyan Hallisey <rhallise@redhat.com>2016-06-13 07:01:48 -0400
committerRyan Hallisey <rhallise@redhat.com>2016-06-13 07:05:26 -0400
commitd360d4e5af09c5c194db783c4344aef10367b7f3 (patch)
treef9b107289077f90c69373c83cf72b60e57daa625 /kolla
parentbaae1b2474d5cfd5ea68b77411c2faa028c8d76f (diff)
downloadkolla-d360d4e5af09c5c194db783c4344aef10367b7f3.tar.gz
kolla-d360d4e5af09c5c194db783c4344aef10367b7f3.zip
Change the search path to look locally
In order to use tools/build.py, we need to search locally for imports. Closes-bug: #1592030 Change-Id: Idfa651c1268f93366de9f4e3fa80c33be42c71c3
Diffstat (limited to 'kolla')
-rwxr-xr-xkolla/cmd/build.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 97dbafc67..eafe8ee73 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -12,6 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import os
+import sys
+
+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.image import build