From ee75142772ff7ad5a147bd4cc6aecdf6f0f13a1c Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Sat, 25 Jun 2016 06:47:18 -0400 Subject: reproducible debian: add template for default footer [ Mattia Rizzolo ] wrap and indent lines in default_page_footer.mustache Signed-off-by: Mattia Rizzolo Signed-off-by: Holger Levsen --- bin/reproducible_common.py | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'bin/reproducible_common.py') diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py index 8738a501..c3ea23fd 100755 --- a/bin/reproducible_common.py +++ b/bin/reproducible_common.py @@ -143,6 +143,9 @@ tab = ' ' renderer = pystache.Renderer(); status_icon_link_template = renderer.load_template( TEMPLATE_PATH + '/status_icon_link') +default_page_footer_template = renderer.load_template( + TEMPLATE_PATH + '/default_page_footer') + html_header = Template(""" @@ -165,23 +168,12 @@ else: JOB_FOOTER += JOB_NAME+' which is configured via this ' JOB_FOOTER += 'git repo.' -html_footer = Template(""" -

-""" % (JOB_FOOTER, JENKINS_URL)) +def create_default_page_footer(date): + return renderer.render(default_page_footer_template, { + 'date': date, + 'job_footer': JOB_FOOTER, + 'jenkins_url': JENKINS_URL, + }) html_head_page = Template((tab*2).join(("""
@@ -391,7 +383,8 @@ def write_html_page(title, body, destfile, suite=defaultsuite, arch=defaultarch, if style_note: html += html_foot_page_style_note.substitute() if not noendpage: - html += html_footer.substitute(date=now) + html += create_default_page_footer(now) + html += '\n' else: html += '\n' try: -- cgit v1.2.3-54-g00ecf