Skip to content

Commit 9241ded

Browse files
committed
TST: Fix up fail2ban python3 scripts
1 parent d061b2b commit 9241ded

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

fail2ban-2to3

+7-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55

66
set -eu
77

8-
nonPyFiles="fail2ban-client fail2ban-server fail2ban-regex fail2ban-testcases"
9-
10-
find . \
11-
-name "*.py" \
12-
-exec 2to3 -w --no-diffs $nonPyFiles {} + \
13-
|| (echo "Fail!" >&2 && exit 1)
14-
15-
echo "Success!" >&2
16-
17-
exit 0
8+
if 2to3 -w --no-diffs bin/* fail2ban;then
9+
echo "Success!" >&2
10+
exit 0
11+
else
12+
echo "Fail!" >&2
13+
exit 1
14+
fi

fail2ban-testcases-all-python3

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ for python in /usr/{,local/}bin/python3.[0-9]{,.*}{,-dbg}
99
do
1010
[ -e "$python" ] || continue
1111
echo "Testing using $python"
12-
$python ./fail2ban-testcases "$@" || failed+=" $python"
12+
$python bin/fail2ban-testcases "$@" || failed+=" $python"
1313
done
1414

1515
if [ ! -z "$failed" ]; then

0 commit comments

Comments
 (0)