From 0662a1fde33684fb7cf1bb572b27270a34b38810 Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Thu, 31 Jan 2013 17:09:23 -0600 Subject: Allow tools/install_venv_common.py to be run from within the source directory. Not doing this raised exceptions when it tried importing modules that didn't exist in the path. Change-Id: I10e02cd9ce6beb8fdf822dd397688450ac6981a1 --- tools/install_venv_common.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 155db3b..75e3302 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, "oslo", + "__init__.py")): + sys.path.insert(0, possible_topdir) + + from openstack.common import cfg -- cgit