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 <imirkin@alum.mit.edu>
Signed-off-by: default avatarDylan Baker <dylanx.c.baker@intel.com>
parent e57794cf
......@@ -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:
......
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