Skip to content
Snippets Groups Projects
Commit 692d176c authored by Mark Goddard's avatar Mark Goddard
Browse files

Fix kolla_ansible python module check

The kolla-ansible script now (Train+) checks whether the kolla_ansible
python module is installed, and emits the following message if not:

ERROR: kolla_ansible has to be available in the PYTHONPATH (e.g.
installed)

It is supposed to exit 1 if this check fails, but does not.

This change fixes this by removing a subshell from the kolla-ansible
script.

Change-Id: I2c1a7398f2b8f876abcf2508874835154cb4ce57
Closes-Bug: #1854049
parent cacf3081
No related branches found
No related tags found
No related merge requests found
......@@ -120,10 +120,10 @@ LONG_OPTS="help,inventory:,playbook:,skip-tags:,tags:,key:,extra:,verbose,config
RAW_ARGS="$*"
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
python -c 'import kolla_ansible' &>/dev/null || (
if ! python -c 'import kolla_ansible' &>/dev/null; then
echo "ERROR: kolla_ansible has to be available in the PYTHONPATH (e.g. installed)" >&2
exit 1
)
fi
eval set -- "$ARGS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment