Commit 5227a603 authored by Dylan Baker's avatar Dylan Baker

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 <>
Signed-off-by: default avatarDylan Baker <>
parent e57794cf
...@@ -161,8 +161,9 @@ ...@@ -161,8 +161,9 @@
escape_filename(test))) escape_filename(test)))
else: else:
raw = res.tests.get(grouptools.groupname(test)) raw = res.tests.get(grouptools.groupname(test))
if raw is not None: name = grouptools.testname(test)
result = raw.subtests[grouptools.testname(test)] if raw is not None and name in raw.subtests:
result = raw.subtests[name]
href = normalize_href(posixpath.join(escape_pathname(, href = normalize_href(posixpath.join(escape_pathname(,
escape_filename(grouptools.groupname(test)))) escape_filename(grouptools.groupname(test))))
else: else:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment