From 9241ded37663988412091b0cb2622eb408bfb61c Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Sat, 13 Apr 2013 16:58:05 +0100 Subject: [PATCH] TST: Fix up fail2ban python3 scripts --- fail2ban-2to3 | 17 +++++++---------- fail2ban-testcases-all-python3 | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/fail2ban-2to3 b/fail2ban-2to3 index a6a61090..2015ed5b 100755 --- a/fail2ban-2to3 +++ b/fail2ban-2to3 @@ -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 diff --git a/fail2ban-testcases-all-python3 b/fail2ban-testcases-all-python3 index fd3ff871..9445f396 100755 --- a/fail2ban-testcases-all-python3 +++ b/fail2ban-testcases-all-python3 @@ -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