From 6c9e44094f2c1401809d7e8a02115dce6f393381 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 5 Feb 2013 18:08:45 -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# 1116269 Change-Id: I3e2ed3ac96b51ec89def911054720d11bbcd9407 --- 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 7bef5bf50..2de8e1c82 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, "quantum", + "__init__.py")): + sys.path.insert(0, possible_topdir) + + from quantum.openstack.common import cfg