diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-06-11 11:40:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-06-11 11:40:42 +0000 |
commit | 9db6e2a77fbcc2614d46ba2e883668a8ad144794 (patch) | |
tree | d6664a45957578f54fca6bd98436169a5bf8c32b /bin | |
parent | c77d4d1c15cf1ab99644e97f10d30f437d9846c8 (diff) | |
parent | 3af83c94299a8222a3ecc61aeffdd0b845d05504 (diff) | |
download | heat-9db6e2a77fbcc2614d46ba2e883668a8ad144794.tar.gz |
Merge "Adds possible topdir to python search path"
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/heat-manage | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/heat-manage b/bin/heat-manage index 1a03e17ab..95e4a5d14 100755 --- a/bin/heat-manage +++ b/bin/heat-manage @@ -14,6 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. +import os +import sys + +# If ../heat/__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, 'heat', '__init__.py')): + sys.path.insert(0, POSSIBLE_TOPDIR) from heat.cmd import manage |