mirror of
https://github.com/fail2ban/fail2ban.git
synced 2025-11-26 14:20:19 +08:00
TST: Fix up fail2ban python3 scripts
This commit is contained in:
@@ -5,13 +5,10 @@
|
||||
|
||||
set -eu
|
||||
|
||||
nonPyFiles="fail2ban-client fail2ban-server fail2ban-regex fail2ban-testcases"
|
||||
|
||||
find . \
|
||||
-name "*.py" \
|
||||
-exec 2to3 -w --no-diffs $nonPyFiles {} + \
|
||||
|| (echo "Fail!" >&2 && exit 1)
|
||||
|
||||
echo "Success!" >&2
|
||||
|
||||
exit 0
|
||||
if 2to3 -w --no-diffs bin/* fail2ban;then
|
||||
echo "Success!" >&2
|
||||
exit 0
|
||||
else
|
||||
echo "Fail!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,7 @@ for python in /usr/{,local/}bin/python3.[0-9]{,.*}{,-dbg}
|
||||
do
|
||||
[ -e "$python" ] || continue
|
||||
echo "Testing using $python"
|
||||
$python ./fail2ban-testcases "$@" || failed+=" $python"
|
||||
$python bin/fail2ban-testcases "$@" || failed+=" $python"
|
||||
done
|
||||
|
||||
if [ ! -z "$failed" ]; then
|
||||
|
||||
Reference in New Issue
Block a user