mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-09 18:21:09 +00:00
handle export for excuse with 'force'
This commit is contained in:
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
|
||||
|
11
excuse.py
11
excuse.py
@ -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…
x
Reference in New Issue
Block a user