aboutsummaryrefslogtreecommitdiffhomepage
path: root/devel
diff options
context:
space:
mode:
authorGravatar W. Trevor King <wking@tremily.us>2014-02-10 10:40:29 -0800
committerGravatar David Bremner <david@tethera.net>2014-02-10 22:47:52 -0400
commita6ff03df3f8fece526536f44a22af2041db021ef (patch)
treebc24d2c7fdaa55293458463e522cdfc0fa69be28 /devel
parenta7e4d9a18fdd9dd0aa3f2ec257d17e364a732876 (diff)
nmbug-status: Consolidate HTML header printing
Make this all one big string, using '...{date}...'.format(date=...) to inject the date [1]. This syntax was added in Python 2.6, and is preferred to %-formatting in Python 3 [1]. [1]: http://docs.python.org/2/library/stdtypes.html#str.format
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/nmbug/nmbug-status13
1 files changed, 6 insertions, 7 deletions
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index be3e28e7..3aa83b62 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -190,13 +190,12 @@ if output_format == 'html':
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Notmuch Patches</title>
</head>
-<body>''')
- print('<h2>Notmuch Patches</h2>')
- print('Generated: %s<br />' % datetime.datetime.utcnow().date())
- print('For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>')
-
- print('<h3>Views</h3>')
- print('<ul>')
+<body>
+<h2>Notmuch Patches</h2>
+Generated: {date}<br />
+For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>
+<h3>Views</h3>
+<ul>'''.format(date=datetime.datetime.utcnow().date()))
for view in config['views']:
print('<li><a href="#%(title)s">%(title)s</a></li>' % view)
print('</ul>')