From cacc8ff92d13482bce6049986fb2035ef05fa973 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 6 Feb 2013 16:23:04 -0500 Subject: Sync latest install_venv_common from oslo. This commit syncs in the latest version of install_venv_common from oslo, which fixes the import issue that was previously addressed by change: I8a3df02a51c2c777d8f47cb8bc72d0644ae47095 which gets reverted by this commit. Change-Id: I910610da5a4c413711819ca39627cb9ee94814ef --- tools/install_venv.py | 3 --- tools/install_venv_common.py | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index 60f4894ed..abf56ea0e 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -22,9 +22,6 @@ import os import sys -parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -os.sys.path.insert(0, parentdir) - import install_venv_common as install_venv diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index b15011a00..3d47b12b2 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -25,6 +25,13 @@ import os import subprocess import sys + +possible_topdir = os.getcwd() +if os.path.exists(os.path.join(possible_topdir, "nova", + "__init__.py")): + sys.path.insert(0, possible_topdir) + + from nova.openstack.common import cfg -- cgit