1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #8882 from kaspar030/fix_flake8_static_test

dist/tools/flake8: use "python -m flake8", handle missing flake8
This commit is contained in:
Alexandre Abadie 2018-04-09 17:55:10 +02:00 committed by GitHub
commit 8395bde01d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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