X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fshow_deferred.py;h=afa12b4b2b5658d601d38bbb7c84f1e8902cb4c3;hb=e3d8cb7bce30c76d6133ab04ce9b01804944d5cb;hp=2bb643d151508bac7b20577d1f0310c51eaeba36;hpb=f9264640fc54af9950119c956973fe5573ada5ab;p=dak.git diff --git a/dak/show_deferred.py b/dak/show_deferred.py index 2bb643d1..afa12b4b 100755 --- a/dak/show_deferred.py +++ b/dak/show_deferred.py @@ -22,7 +22,14 @@ import sys, os, re, time import apt_pkg -from debian_bundle import deb822 + +try: + # starting with squeeze + from debian import deb822 +except: + # up to lenny + from debian_bundle import deb822 + from daklib.dbconn import * from daklib import utils from daklib.regexes import re_html_escaping, html_escaping @@ -81,7 +88,15 @@ def header(): """ def footer(): - res = "

Timestamp: %s (UTC)

" % (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime())) + res = """ +

deferred, last day

+

deferred, last week

+

deferred, last month

+

deferred, last year

+

deferred, last 5 years

+

deferred, last 10 years

+""" + res += "

Timestamp: %s (UTC)

" % (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime())) res += """ Valid HTML 4.01! @@ -172,7 +187,7 @@ def list_uploads(filelist): f = open(fn,"w") try: for u in uploads: - print >> f, "Changes: %s"%u[1] + print >> f, "Changes-file: %s"%u[1] fields = """Location: DEFERRED Delayed-Until: %s Delay-Remaining: %s"""%(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()+u[0])),u[2])