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:
parent
5c82b75576
commit
514d011867
@ -25,6 +25,12 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
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
|
from quantum.openstack.common import cfg
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user