Skip to content
Snippets Groups Projects
Unverified Commit 8395bde0 authored by Alexandre Abadie's avatar Alexandre Abadie Committed by GitHub
Browse files

Merge pull request #8882 from kaspar030/fix_flake8_static_test

dist/tools/flake8: use "python -m flake8", handle missing flake8
parents c23eb5a8 7c5d549d
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@
# directory for more details.
#
FLAKE8_CMD="python3 -m flake8"
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
CERROR="\e[1;31m"
CRESET="\e[0m"
......@@ -26,7 +28,12 @@ then
exit 0
fi
ERRORS=$(flake8 --config=${DIST_TOOLS}/flake8/flake8.cfg ${FILES})
${FLAKE8_CMD} --version &> /dev/null || {
printf "${CERROR}$0: cannot execute \"${FLAKE8_CMD}\"!${CRESET}\n"
exit 1
}
ERRORS=$(${FLAKE8_CMD} --config=${DIST_TOOLS}/flake8/flake8.cfg ${FILES})
if [ -n "${ERRORS}" ]
then
......
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