From cc644bc57f1fd1e7b5e86dc1aec4f1dae193b476 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Mon, 16 Dec 2013 23:05:09 +0100 Subject: [PATCH] Avoid exploding when reading broken hints If hint.check() fails, just ignore the hint instead of killing britney. Signed-off-by: Julien Cristau --- hints.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hints.py b/hints.py index b54584c..7b43cdb 100644 --- a/hints.py +++ b/hints.py @@ -33,7 +33,10 @@ class HintCollection(object): ] def add_hint(self, hint, user): - self._hints.append(Hint(hint, user)) + try: + self._hints.append(Hint(hint, user)) + except AssertionError: + print "Ignoring broken hint %r from %s" % (hint, user) class Hint(object): NO_VERSION = [ 'block', 'block-all', 'block-udeb' ]