diff options
| author | Ewan Mellor <ewan.mellor@citrix.com> | 2010-09-10 10:57:58 +0100 |
|---|---|---|
| committer | Ewan Mellor <ewan.mellor@citrix.com> | 2010-09-10 10:57:58 +0100 |
| commit | ddd25656fac76cfb9f6226f5843f4b452a74a75e (patch) | |
| tree | 9c3981b17177b3b081f5e6dec9527cdcaebb2243 /bin/nova-api | |
| parent | b049c032a9f950d67bbfe709802288a7fe28bdd6 (diff) | |
| parent | 30cec546812799fba09a2bab2b3aa4aad712ae3c (diff) | |
Merge with trunk.
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/nova-api b/bin/nova-api index a3ad5a0e1..ede09d38c 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -22,9 +22,19 @@ Tornado daemon for the main API endpoint. """ import logging +import os +import sys from tornado import httpserver from tornado import ioloop +# If ../nova/__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, 'nova', '__init__.py')): + sys.path.insert(0, possible_topdir) + from nova import flags from nova import server from nova import utils |
