X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=681cc1fc06cbb078f4f747ee1b61569e798d26d9;hp=cdce5f98c012d319d4ed4e4acd2e6fe6a33ef730;hb=4ba1fd8d55a6fefa3349fcf221aece3a345e3ca2;hpb=d45c3f997201a6f17b39b3e5ceb82b332852149f diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index cdce5f98c0..681cc1fc06 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -169,7 +169,7 @@ def table_merged_details(table, input_data): format(col_data[:-5]) row_lst.append('"{0}"'.format(col_data)) except KeyError: - row_lst.append("No data") + row_lst.append('"Not captured"') table_lst.append(row_lst) # Write the data to file @@ -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