# HG changeset patch
# User cmlenz
# Date 1209337104 0
# Node ID 9b3d97297201c56f1130755c3e76d9025abccc12
# Parent fbd5bc3c2a48b3c4b49e958a0b1cdd2639aebabc
Fix compatibility problem with Genshi trunk.
diff --git a/bitten/web_ui.py b/bitten/web_ui.py
--- a/bitten/web_ui.py
+++ b/bitten/web_ui.py
@@ -85,8 +85,8 @@
if not req.perm.has_permission('BUILD_VIEW'):
return
yield ('mainnav', 'build', \
- Markup('Build Status',
- req.href.build()))
+ Markup('Build Status') %
+ req.href.build())
# ITemplatesProvider methods
@@ -451,8 +451,9 @@
errors += [(step.name, error) for error
in step.errors]
- title = Markup('Build of %s [%s] on %s %s', label, rev,
- platform, _status_label[status])
+ title = Markup('Build of %s [%s] on %s %s') % (
+ label, rev, platform, _status_label[status]
+ )
message = ''
if req.args.get('format') == 'rss':
href = req.abs_href.build(config, id)
@@ -476,7 +477,7 @@
for step, error in errors:
if step not in steps:
steps.append(step)
- steps = [Markup('%s', step) for step in steps]
+ steps = [Markup('%s') % step for step in steps]
if len(steps) < 2:
message = steps[0]
elif len(steps) == 2:
@@ -484,8 +485,9 @@
elif len(steps) > 2:
message = Markup(', ').join(steps[:-1]) + ', and ' + \
steps[-1]
- message = Markup('Step%s %s failed',
- len(steps) != 1 and 's' or '', message)
+ message = Markup('Step%s %s failed') % (
+ len(steps) != 1 and 's' or '', message
+ )
yield event_kinds[status], href, title, stopped, None, message
# Internal methods