[Piuparts-commits] [piuparts] 09/20: p-r: insert piuparts version via Template

Holger Levsen holger at moszumanska.debian.org
Sat Nov 23 20:23:34 UTC 2013


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit bb186b586632dea20ca3d910ba94e05a9ef03450
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sat Nov 9 19:31:20 2013 +0100

    p-r: insert piuparts version via Template
    
    Signed-off-by: Andreas Beckmann <anbe at debian.org>
---
 piuparts-report.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/piuparts-report.py b/piuparts-report.py
index 9e73a0a..1ff9504 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -52,10 +52,12 @@ CONFIG_FILE = "/etc/piuparts/piuparts.conf"
 DISTRO_CONFIG_FILE = "/etc/piuparts/distros.conf"
 
 
+PIUPARTS_VERSION = "__PIUPARTS_VERSION__"
+
 HTML_HEADER = """
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <!-- Generated by piuparts-report __PIUPARTS_VERSION__ -->
+  <!-- Generated by piuparts-report $piuparts_version -->
   <title>
    $page_title
   </title>
@@ -609,6 +611,7 @@ def write_template_html(filename, body, mapping={}):
     htmlpage = string.Template(header + body + footer)
     mapping = mapping.copy()
     mapping.update({
+        "piuparts_version": PIUPARTS_VERSION,
         "time": time.strftime("%Y-%m-%d %H:%M %Z"),
         })
     write_file(filename, htmlpage.safe_substitute(mapping))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list