aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2022-08-11 13:03:52 +0200
committerTibor Frank <tifrank@cisco.com>2022-08-11 13:11:53 +0200
commitae49a33a8ee6d873521420e73c202b86b4acf6a0 (patch)
tree2c28e8847422c6104c15196911058631424aef6c /resources
parentde769e159f401c779e01ef0aa84fa8f700d8b31c (diff)
Trending: weekly comparison - workaround
- Temporary solution: use build number if vpp version is not available Change-Id: I256ac987cb234f27bfdd052cb44f5d8968c1cffa Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/tools/presentation/generator_tables.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 1439c4a3c0..b09b820419 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -2176,9 +2176,10 @@ def table_weekly_comparison(table, in_data):
header[1].insert(
1, in_data.metadata(job_name, build_nr).get(u"generated", u"")
)
- logging.info(in_data.metadata(job_name, build_nr).get(u"version", u"ERROR"))
+ logging.info(
+ in_data.metadata(job_name, build_nr).get(u"version", u"ERROR"))
header[0].insert(
- 1, in_data.metadata(job_name, build_nr).get(u"version", u"")
+ 1, in_data.metadata(job_name, build_nr).get("version", build_nr)
)
for tst_name, tst_data in build.items():
@@ -2280,13 +2281,15 @@ def table_weekly_comparison(table, in_data):
# Reorganize header in txt table
txt_table = list()
- with open(txt_file_name, u"rt", encoding='utf-8') as file_handler:
- for line in list(file_handler):
- txt_table.append(line)
try:
+ with open(txt_file_name, u"rt", encoding='utf-8') as file_handler:
+ for line in list(file_handler):
+ txt_table.append(line)
txt_table.insert(5, txt_table.pop(2))
with open(txt_file_name, u"wt", encoding='utf-8') as file_handler:
file_handler.writelines(txt_table)
+ except FileNotFoundError as err:
+ logging.error(repr(err))
except IndexError:
pass