summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2013-01-31 17:09:23 -0600
committerJosh Kearney <josh@jk0.org>2013-02-05 10:35:48 -0600
commit0662a1fde33684fb7cf1bb572b27270a34b38810 (patch)
treede06f66a5010ce44de8123ad9ec4b44ae59b896a /tools
parentea46d462fcfd7d393b71b14206a5e6d86bf1994b (diff)
downloadoslo-0662a1fde33684fb7cf1bb572b27270a34b38810.tar.gz
oslo-0662a1fde33684fb7cf1bb572b27270a34b38810.tar.xz
oslo-0662a1fde33684fb7cf1bb572b27270a34b38810.zip
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
Diffstat (limited to 'tools')
-rw-r--r--tools/install_venv_common.py7
1 files changed, 7 insertions, 0 deletions
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