mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03:00
pre-commit: make pyflakes optional to support older platforms
Travis-CI defaults to Ubuntu/precise, which has a very old version of pyflakes that throws false positives.
This commit is contained in:
parent
2983f3505d
commit
c9394b1c99
1 changed files with 6 additions and 1 deletions
|
@ -63,6 +63,10 @@ err() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
echo WARNING: "$@"
|
||||||
|
}
|
||||||
|
|
||||||
cmd_exists() {
|
cmd_exists() {
|
||||||
command -v $1 1>/dev/null
|
command -v $1 1>/dev/null
|
||||||
}
|
}
|
||||||
|
@ -72,7 +76,8 @@ if cmd_exists pyflakes-python2; then
|
||||||
elif cmd_exists pyflakes; then
|
elif cmd_exists pyflakes; then
|
||||||
PYFLAKES=pyflakes
|
PYFLAKES=pyflakes
|
||||||
else
|
else
|
||||||
err "pyflakes is not installed!"
|
PYFLAKES=echo
|
||||||
|
warn "pyflakes is not installed, using dummy placeholder!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if cmd_exists pep8-python2; then
|
if cmd_exists pep8-python2; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue