From 371f80c11e2e4bdf311b2447db2bd8bc66324886 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Sat, 3 Mar 2018 19:22:04 +0100 Subject: [PATCH] Detect complete absense of Python --- src/ansible-cmdb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ansible-cmdb b/src/ansible-cmdb index b65e477..4f7810f 100755 --- a/src/ansible-cmdb +++ b/src/ansible-cmdb @@ -9,6 +9,11 @@ PY_BIN=$(which python) if [ -z "$PY_BIN" ]; then PY_BIN=$(which python3) fi +if [ -z "$PY_BIN" ]; then + echo "No python found. Aborting" + exit 1 +fi + # Verify Python version PY_VMAJOR=$($PY_BIN -c "import sys; print(sys.version_info.major)")