summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/index.mako5
-rw-r--r--templates/testrun_info.mako7
2 files changed, 8 insertions, 4 deletions
diff --git a/templates/index.mako b/templates/index.mako
index 690206fdf..39f4976b4 100644
--- a/templates/index.mako
+++ b/templates/index.mako
@@ -3,6 +3,7 @@
import posixpath # this must be posixpath, since we want /'s not \'s
import re
+ import six
from six.moves import range
from framework import grouptools, status
@@ -23,7 +24,7 @@
return status.NOTRUN
return max([status.status_lookup(s) for s, v in
- result.totals[group].iteritems() if v > 0])
+ six.iteritems(result.totals[group]) if v > 0])
def group_fraction(result, group):
"""Get the fraction value for a group."""
@@ -32,7 +33,7 @@
num = 0
den = 0
- for k, v in result.totals[group].iteritems():
+ for k, v in six.iteritems(result.totals[group]):
if v > 0:
s = status.status_lookup(k)
num += s.fraction[0] * v
diff --git a/templates/testrun_info.mako b/templates/testrun_info.mako
index f8e1b4773..473897a29 100644
--- a/templates/testrun_info.mako
+++ b/templates/testrun_info.mako
@@ -1,3 +1,6 @@
+<%!
+ import six
+%>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//END"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -21,10 +24,10 @@
<td>totals</td>
<td>
<table>
- % for key, value in sorted(totals.iteritems(), key=lambda (k,v): (v,k), reverse=True):
+ % for key, value in sorted(six.iteritems(totals), key=lambda i: (i[1], i[0]), reverse=True):
<tr><td>${key}</td><td>${value}</td></tr>
% endfor
- <tr><td>total</td><td>${sum(totals.itervalues())}</td></tr>
+ <tr><td>total</td><td>${sum(six.itervalues(totals))}</td></tr>
</table>
</td>
</tr>