handle export for excuse with 'force'

debian
Ivo De Decker 11 years ago committed by Niels Thykier
parent a037c189e9
commit 87813401bf

@ -1472,7 +1472,7 @@ class Britney(object):
excuse.dontinvalidate = True
if not update_candidate and forces:
excuse.addhtml("Should ignore, but forced by %s" % (forces[0].user))
# TODO force
excuse.force()
update_candidate = True
# if the package can be updated, it is a valid candidate

@ -50,6 +50,7 @@ class Excuse(object):
self.section = None
self._is_valid = False
self._dontinvalidate = False
self.forced = False
self.invalid_deps = []
self.deps = {}
@ -117,6 +118,10 @@ class Excuse(object):
self.daysold = daysold
self.mindays = mindays
def force(self):
"""Add force hint"""
self.forced = True
def addhtml(self, note):
"""Add a note in HTML"""
self.htmlline.append(note)
@ -219,6 +224,10 @@ class Excuse(object):
excusedata["ageneeded"] = self.mindays
excusedata["newbugs"] = self.newbugs.keys()
excusedata["oldbugs"] = self.oldbugs.keys()
excusedata["reason"] = self.reason.keys()
if self.forced:
excusedata["forcedreason"] = self.reason.keys()
excusedata["reason"] = []
else:
excusedata["reason"] = self.reason.keys()
return excusedata

Loading…
Cancel
Save