X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fshow_deferred.py;h=8c13d677befdf1d6d4f56db80ed9cbdcb4f7c819;hb=cdffcfe2a0e6804ed35df56c4c2aa084c2b63677;hp=aa33b2e5de99414eecc57fede9844e8d8425b7e6;hpb=276e9002288432328879ada4ddc2dcefbb55158c;p=dak.git diff --git a/dak/show_deferred.py b/dak/show_deferred.py index aa33b2e5..8c13d677 100755 --- a/dak/show_deferred.py +++ b/dak/show_deferred.py @@ -22,17 +22,25 @@ import sys, os, re, time import apt_pkg +import tempfile from debian_bundle import deb822 from daklib import database from daklib import queue from daklib import utils +from daklib.regexes import re_html_escaping, html_escaping + +################################################################################ +### work around bug #487902 in debian-python 0.1.10 +deb822.Changes._multivalued_fields = { + "files": [ "md5sum", "size", "section", "priority", "name" ], + "checksums-sha1": ["sha1", "size", "name"], + "checksums-sha256": ["sha256", "size", "name"], + } ################################################################################ row_number = 1 -html_escaping = {'"':'"', '&':'&', '<':'<', '>':'>'} -re_html_escaping = re.compile('|'.join(map(re.escape, html_escaping.keys()))) def html_escape(s): return re_html_escaping.sub(lambda x: html_escaping.get(x.group(0)), s) @@ -145,19 +153,40 @@ def get_upload_data(changesfn): if os.path.exists(qfn): os.symlink(qfn,lfn) os.chmod(qfn, 0644) - return (delaydays*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes').split()) + return (max(delaydays-1,0)*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes','').split(),achanges) def list_uploads(filelist): uploads = map(get_upload_data, filelist) uploads.sort() + # print the summary page print header() if uploads: print table_header() - print ''.join(map(lambda x: table_row(*x[1:]), uploads)) + print ''.join(map(lambda x: table_row(*x[1:5]), uploads)) print table_footer() else: print '