From 6e6a0a9e552d645402c0785380ce91a91d7982df Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Mon, 25 Nov 2019 12:41:44 +0000 Subject: [PATCH] Fix python3 issue in devstack plugin Use $PYTHON to execute manage.py commands because it handles both py2 and py3 environment. Change-Id: I694f42db9b8110ee2b95b8132cd5ee5aa9d7357b --- devstack/plugin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 52294fd..76333e2 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -1,6 +1,7 @@ # plugin.sh - DevStack plugin.sh dispatch script zun-ui ZUN_UI_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd) +PYTHON=${PYTHON:-python} function install_zun_ui { # NOTE(shu-mutou): workaround for devstack bug: 1540328 @@ -19,7 +20,7 @@ function configure_zun_ui { # NOTE: If locale directory does not exist, compilemessages will fail, # so check for an existence of locale directory is required. if [ -d ${ZUN_UI_DIR}/zun_ui/locale ]; then - (cd ${ZUN_UI_DIR}/zun_ui; DJANGO_SETTINGS_MODULE=openstack_dashboard.settings ../manage.py compilemessages) + (cd ${ZUN_UI_DIR}/zun_ui; DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $PYTHON ../manage.py compilemessages) fi }