Avoid exploding when reading broken hints

If hint.check() fails, just ignore the hint instead of killing britney.

Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Julien Cristau 2013-12-16 23:03:34 +01:00
parent 7f471eca25
commit 3c8f72607e

View File

@ -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' ]