summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Treinish <treinish@linux.vnet.ibm.com>2013-02-04 10:09:23 -0500
committerMatthew Treinish <treinish@linux.vnet.ibm.com>2013-02-04 10:14:32 -0500
commit38c7fa2ab903624b3bfc40238a461e7b7795568a (patch)
treef2a329c68b97fdd52aa68334cb9e7b152f59dd63 /tools
parent47bbf12a6c9705e5abca29a1d44b753c8506505d (diff)
downloadnova-38c7fa2ab903624b3bfc40238a461e7b7795568a.tar.gz
nova-38c7fa2ab903624b3bfc40238a461e7b7795568a.tar.xz
nova-38c7fa2ab903624b3bfc40238a461e7b7795568a.zip
Fix import for install_venv.py
On systems that don't use devstack the nova directory doesn't automatically get added to the python path. This breaks tools/install_venv_common.py which imports from nova.openstack.common. This fixes the issue by manually adding the nova root directory to the python path before tools/install_venv_common.py is imported. Change-Id: I8a3df02a51c2c777d8f47cb8bc72d0644ae47095
Diffstat (limited to 'tools')
-rw-r--r--tools/install_venv.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py
index abf56ea0e..60f4894ed 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -22,6 +22,9 @@
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