mirror of https://github.com/fail2ban/fail2ban
TST: Fix up fail2ban python3 scripts
parent
d061b2b549
commit
9241ded376
|
@ -5,13 +5,10 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
nonPyFiles="fail2ban-client fail2ban-server fail2ban-regex fail2ban-testcases"
|
if 2to3 -w --no-diffs bin/* fail2ban;then
|
||||||
|
echo "Success!" >&2
|
||||||
find . \
|
exit 0
|
||||||
-name "*.py" \
|
else
|
||||||
-exec 2to3 -w --no-diffs $nonPyFiles {} + \
|
echo "Fail!" >&2
|
||||||
|| (echo "Fail!" >&2 && exit 1)
|
exit 1
|
||||||
|
fi
|
||||||
echo "Success!" >&2
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ for python in /usr/{,local/}bin/python3.[0-9]{,.*}{,-dbg}
|
||||||
do
|
do
|
||||||
[ -e "$python" ] || continue
|
[ -e "$python" ] || continue
|
||||||
echo "Testing using $python"
|
echo "Testing using $python"
|
||||||
$python ./fail2ban-testcases "$@" || failed+=" $python"
|
$python bin/fail2ban-testcases "$@" || failed+=" $python"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z "$failed" ]; then
|
if [ ! -z "$failed" ]; then
|
||||||
|
|
Loading…
Reference in New Issue