From b32540e445e8f547ba6bfa1ba50d4683215dc01e Mon Sep 17 00:00:00 2001 From: Samuel Loury Date: Fri, 28 Nov 2014 14:13:24 +0100 Subject: [PATCH] Prevent pyflakes from being called if not found --- tools/pyflakes.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/pyflakes.sh b/tools/pyflakes.sh index c0a40971..cafcbd23 100755 --- a/tools/pyflakes.sh +++ b/tools/pyflakes.sh @@ -31,6 +31,11 @@ else if which pyflakes-python2 >/dev/null 2>&1; then PYFLAKES=pyflakes-python2 fi + if [ -z "${PYFLAKES}" ] + then + echo "pyflakes not found" + exit 1 + fi # check for modern pyflakes if ${PYFLAKES} --version >/dev/null 2>&1; then exec ${PYFLAKES} $PYFILES