summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2015-09-23 23:27:46 (GMT)
committerDylan Baker <baker.dylan.c@gmail.com>2015-09-24 21:29:24 (GMT)
commit5227a60383d94c8f8376394466dff2f810615091 (patch)
treee245c4e2e5765ff6a87e3b4e9e47865f4ea34ff7 /templates
parente57794cf3b1a4b3d424185f924435d9994e50724 (diff)
downloadpiglit-5227a60383d94c8f8376394466dff2f810615091.tar.gz
piglit-5227a60383d94c8f8376394466dff2f810615091.tar.xz
templates/index.mako: handle missing subtests correctly
This patch fixes the handling of subtests when more than one result is presented. Currently this will raise a KeyError and die horribly. cc: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/index.mako5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/index.mako b/templates/index.mako
index 6efcd41..d2b84b5 100644
--- a/templates/index.mako
+++ b/templates/index.mako
@@ -161,8 +161,9 @@
escape_filename(test)))
else:
raw = res.tests.get(grouptools.groupname(test))
- if raw is not None:
- result = raw.subtests[grouptools.testname(test)]
+ name = grouptools.testname(test)
+ if raw is not None and name in raw.subtests:
+ result = raw.subtests[name]
href = normalize_href(posixpath.join(escape_pathname(res.name),
escape_filename(grouptools.groupname(test))))
else: