From 3a36114f1f70fe80cec43b568eabd15e166f1c25 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Thu, 10 Sep 2015 22:25:31 +0100 Subject: Support meta-refresh header Signed-off-by: Chris Lamb --- bin/reproducible_common.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_common.py') diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index df8374cd..38163ca0 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -122,6 +122,7 @@ html_header = Template(""" + $meta_refresh $page_title @@ -281,14 +282,17 @@ def _gen_links(suite, arch): return html -def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False, packages=False): +def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, noheader=False, style_note=False, noendpage=False, packages=False, refresh_every=None): now = datetime.utcnow().strftime('%Y-%m-%d %H:%M UTC') html = '' # this removes the padding if we are writing a package page padding = 'class="wrapper"' if packages else '' + meta_refresh = '' % \ + refresh_every if refresh_every is not None else '' html += html_header.substitute( page_title=title, - padding=padding) + padding=padding, + meta_refresh=meta_refresh) if not noheader: links = _gen_links(suite, arch) html += html_head_page.substitute( -- cgit v1.2.3-70-g09d2