提交 101a50f6 编写于 作者: A Ansgar Burchardt

process-upload: Add counter for rejected packages

Signed-off-by: NAnsgar Burchardt <ansgar@debian.org>
上级 38a69fc6
......@@ -503,6 +503,13 @@ def main():
utils.size_type(int(summarystats.accept_bytes)))
Logger.log(["total", summarystats.accept_count, summarystats.accept_bytes])
if summarystats.reject_count:
sets = "set"
if summarystats.reject_count > 1:
sets = "sets"
print "Rejected %d package %s." % (summarystats.reject_count, sets)
Logger.log(["rejected", summarystats.reject_count])
byebye()
if not Options["No-Action"]:
......
......@@ -2451,6 +2451,8 @@ distribution."""
if self.logger:
self.logger.log(["rejected", self.pkg.changes_file])
stats = SummaryStats()
stats.reject_count += 1
return 0
################################################################################
......
......@@ -35,8 +35,11 @@ class SummaryStats(object):
if not getattr(self, 'initialised', False):
self.initialised = True
self.reset_accept()
self.reset_reject()
def reset_accept(self):
self.accept_count = 0
self.accept_bytes = 0
def reset_reject(self):
self.reject_count = 0
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册