X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_deferred.py;h=8c13d677befdf1d6d4f56db80ed9cbdcb4f7c819;hb=4b277e613887f5103cd2ab64262fe29ad1bf7540;hp=6c24c23787aac7ba3162f447515e1435e85c5a60;hpb=2c92f33b772a51832d558bb8ab9112b35476c7fa;p=dak.git diff --git a/dak/show_deferred.py b/dak/show_deferred.py index 6c24c237..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 '