From a09f3dd605f18c1b8ca85be3781304e98cf09110 Mon Sep 17 00:00:00 2001 From: Przemek Wirkus Date: Thu, 14 Aug 2014 11:30:50 +0100 Subject: [PATCH] Bugfix: when displaying extra summary using -t option some indexes are not found and dictionary must be checked against key --- workspace_tools/test_api.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/workspace_tools/test_api.py b/workspace_tools/test_api.py index 16e8b74801..54754958d7 100644 --- a/workspace_tools/test_api.py +++ b/workspace_tools/test_api.py @@ -370,12 +370,14 @@ class SingleTestRunner(object): pt.padding_width = 1 # One space between column edges and contents (default) for test in unique_tests: - test_results = result_dict[test] - row = [target, test, unique_test_desc[test]] - for toolchain in unique_toolchains: - if toolchain in test_results: - row.append(test_results[toolchain]) - pt.add_row(row) + if test in result_dict: + test_results = result_dict[test] + if test in unique_test_desc: + row = [target, test, unique_test_desc[test]] + for toolchain in unique_toolchains: + if toolchain in test_results: + row.append(test_results[toolchain]) + pt.add_row(row) result += pt.get_string() shuffle_seed_text = "Shuffle Seed: %.*f"% (self.SHUFFLE_SEED_ROUND, shuffle_seed if shuffle_seed else self.shuffle_random_seed)