From 38c7fa2ab903624b3bfc40238a461e7b7795568a Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 4 Feb 2013 10:09:23 -0500 Subject: 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 --- tools/install_venv.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools') 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 -- cgit