From 87b1cdc164856bf32dee403c6eab19e2f7f1efab Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 5 Feb 2013 20:54:43 -0500 Subject: [PATCH] Allow tools/install_venv_common.py to be run from within the source directory. (Copy latest update from oslo) Not doing this raised exceptions when it tried importing modules that didn't exist in the path. Fixes LP# 1112484 Change-Id: I2be7bde0bf873a22318617b987a76b209caef22a --- tools/install_venv_common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 928dc3c9f..34ec14279 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -25,6 +25,12 @@ import os import subprocess import sys +possible_topdir = os.getcwd() +if os.path.exists(os.path.join(possible_topdir, "cinder", + "__init__.py")): + sys.path.insert(0, possible_topdir) + + from cinder.openstack.common import cfg -- 2.45.2