aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_tables.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-04-10 09:42:13 +0200
committerTibor Frank <tifrank@cisco.com>2019-04-10 11:18:25 +0200
commit8d8c5c429ef242d3903f2ad3f4743fcac50d6253 (patch)
treee5d8475b8f8e5b7718668867ee392bda713ecdcb /resources/tools/presentation/generator_tables.py
parentd0dd5b06400631a5c8e8327923f9fe37e3e37f62 (diff)
Trending: Reduce input data
Change-Id: Ia787036e4a717b9693df09fc75738369d6d39b57 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r--resources/tools/presentation/generator_tables.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index cdce5f98c0..6f9925fede 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -885,8 +885,14 @@ def table_last_failed_tests(table, input_data):
for job, builds in table["data"].items():
for build in builds:
build = str(build)
+ try:
+ version = input_data.metadata(job, build).get("version", "")
+ except KeyError:
+ logging.error("Data for {job}: {build} is not present.".
+ format(job=job, build=build))
+ return
tbl_list.append(build)
- tbl_list.append(input_data.metadata(job, build).get("version", ""))
+ tbl_list.append(version)
for tst_name, tst_data in data[job][build].iteritems():
if tst_data["status"] != "FAIL":
continue