diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2015-09-23 16:27:46 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-09-24 14:29:24 -0700 |
commit | 5227a60383d94c8f8376394466dff2f810615091 (patch) | |
tree | e245c4e2e5765ff6a87e3b4e9e47865f4ea34ff7 | |
parent | e57794cf3b1a4b3d424185f924435d9994e50724 (diff) |
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>
-rw-r--r-- | templates/index.mako | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/index.mako b/templates/index.mako index 6efcd41af..d2b84b5c0 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: |