From 6375554363c111fda70b7540c3c56a0e9cf1497b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 16 Apr 2013 15:57:58 +0100 Subject: Stop using bare except: statements It is almost never a good idea to catch all exceptions, and then do nothing about them. This patch logs all caught exceptions so that the user has some possibilty to debug what is happening. Also, make ./check check for bare excepts and fail the test suite if it finds anything. --- check | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'check') diff --git a/check b/check index 170ed8bf..5a18310a 100755 --- a/check +++ b/check @@ -126,6 +126,11 @@ then echo "ERROR: $x has a hashbang" 1>&2 errors=1 fi + if grep except: "$x" + then + echo "ERROR: $x has a bare except:" 1>&2 + errors=1 + fi ;; esac done -- cgit v1.2.1