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
This commit is contained in:
Davanum Srinivas 2013-02-05 18:08:45 -05:00
parent 5840627a48
commit 7beec04415

View File

@ -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