updated python_find_quit.sh

pull/2/head
Hari Sekhon 8 years ago
parent 65782498e5
commit ad2c6fdb4a

@ -25,11 +25,11 @@ if [ -z "$(find -L "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy')
fi
section "Python - finding any instances of calling quit() in code which are probably typos for custom qquit()"
echo
for x in $(find -L "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy'); do
type isExcluded &>/dev/null && isExcluded "$x" && continue
egrep '^[^#]*\bquit' "$x" &&
type isExcluded &>/dev/null && isExcluded "$x" && echo -n '-' && continue
echo -n '.'
egrep '^[^#]*\bquit\b' "$x" &&
{ echo "ERROR: $x contains quit() call!! Typo?"; exit 1; }
done
section "Python - passed - no quit() calls found"

Loading…
Cancel
Save