summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-04-16 15:57:58 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-04-16 16:03:23 +0100
commit6375554363c111fda70b7540c3c56a0e9cf1497b (patch)
tree46cd93eda94aa5009dc8626949e23658fb8e4962 /check
parente7e90384da00a8197c5e0363a5a4005754a790eb (diff)
downloadmorph-6375554363c111fda70b7540c3c56a0e9cf1497b.tar.gz
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.
Diffstat (limited to 'check')
-rwxr-xr-xcheck5
1 files changed, 5 insertions, 0 deletions
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