Stop manipulating sys.path when launching services
Stop manipulating python sys path during mistral startup. So far, nobody claimed that this was used and this sounds a hacky stuff. Change-Id: Idc78e2e99a31c62b5e27718cbbe53ef1f3932f8f Signed-off-by: Arnaud M <arnaud.morin@gmail.com>
This commit is contained in:
@@ -27,22 +27,6 @@ eventlet.monkey_patch(
|
||||
time=True)
|
||||
|
||||
|
||||
import os
|
||||
|
||||
|
||||
# If ../mistral/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
POSSIBLE_TOPDIR = os.path.normpath(
|
||||
os.path.join(
|
||||
os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir
|
||||
)
|
||||
)
|
||||
|
||||
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'mistral', '__init__.py')):
|
||||
sys.path.insert(0, POSSIBLE_TOPDIR)
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_service import service
|
||||
|
||||
Reference in New Issue
Block a user