X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fqueue_report.py;h=a4bcea0fbda39303bd0bd37d3701b050f94379f4;hb=35cd0972b5e14dc8727403e13fccd30776f3ae02;hp=29d0788124082c672d84eebebca86670d2a8608d;hpb=2b4d5bf75e28a6b5fa5afbd58defdf661c893033;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py index 29d07881..a4bcea0f 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Produces a report on NEW and BYHAND packages +""" Produces a report on NEW and BYHAND packages """ # Copyright (C) 2001, 2002, 2003, 2005, 2006 James Troup # This program is free software; you can redistribute it and/or modify @@ -38,6 +38,7 @@ import copy, glob, os, stat, sys, time import apt_pkg import cgi from daklib import queue +from daklib import database from daklib import utils from daklib.dak_exceptions import * @@ -45,6 +46,7 @@ Cnf = None Upload = None direction = [] row_number = 0 +projectB = None ################################################################################ @@ -268,15 +270,15 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing print "%s
" % (dist) print "" print "%s" % (last_mod) - (name, mail) = maint.split(":") + (name, mail) = maint.split(":", 1) print "" print "Maintainer: %s
" % (utils.html_escape(mail), utils.html_escape(name)) - (name, mail) = changedby.split(":") + (name, mail) = changedby.split(":", 1) print "Changed-By: %s
" % (utils.html_escape(mail), utils.html_escape(name)) try: - (login, domain) = sponsor.split("@") + (login, domain) = sponsor.split("@", 1) print "Sponsor: %s@debian.org
" % (utils.html_escape(login), utils.html_escape(login)) except: pass @@ -327,7 +329,7 @@ def process_changes_files(changes_files, type, log): else: if mtime < oldest: oldest = mtime - have_note += (d.has_key("process-new note")) + have_note += (database.has_new_comment(d["source"], d["version"])) per_source[source]["oldest"] = oldest if not have_note: per_source[source]["note_state"] = 0; # none @@ -455,10 +457,10 @@ def process_changes_files(changes_files, type, log): log.write("Last-Modified: " + str(int(time.time()) - int(last_modified)) + "\n") log.write("Queue: " + type + "\n") - (name, mail) = maint.split(":") + (name, mail) = maint.split(":", 1) log.write("Maintainer: " + name + " <"+mail+">" + "\n") if changedby: - (name, mail) = changedby.split(":") + (name, mail) = changedby.split(":", 1) log.write("Changed-By: " + name + " <"+mail+">" + "\n") if sponsor: log.write("Sponsored-By: " + sponsor + "\n") @@ -531,6 +533,7 @@ def main(): usage() Upload = queue.Upload(Cnf) + projectB = Upload.projectB if Cnf.has_key("Queue-Report::Options::New"): header()