mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-16 13:01:29 +00:00
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:
parent
36da23b5b7
commit
cc644bc57f
5
hints.py
5
hints.py
@ -33,7 +33,10 @@ class HintCollection(object):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def add_hint(self, hint, user):
|
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):
|
class Hint(object):
|
||||||
NO_VERSION = [ 'block', 'block-all', 'block-udeb' ]
|
NO_VERSION = [ 'block', 'block-all', 'block-udeb' ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user