Put possible_topdir back in nova-api.

This commit is contained in:
Josh Kearney
2011-06-28 22:43:32 +00:00
committed by Tarmac

View File

@@ -23,8 +23,14 @@ Starts both the EC2 and OpenStack APIs in separate processes.
"""
import os
import sys
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, "nova", "__init__.py")):
sys.path.insert(0, possible_topdir)
import nova.service
import nova.utils