diff options
author | Tibor Frank <tifrank@cisco.com> | 2022-08-09 15:17:04 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2022-08-09 15:17:04 +0200 |
commit | 9a4eea1ce2e49d872e22872c46985c659bad7254 (patch) | |
tree | e5285589b69add75a7edb0d1a4e5e18649dbbda5 | |
parent | ecb72fd8f7737e05793bfa92555c7c77b51fa13e (diff) |
PAL: Add debug output to table_weekly_comparison
Change-Id: Ibb117e49e2ff5d3381a9d081c3f6eed6721abe51
Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r-- | resources/tools/presentation/generator_tables.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 273288c1aa..82e59c466f 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -2265,7 +2265,19 @@ def table_weekly_comparison(table, in_data): txt_file_name = f"{table[u'output-file']}.txt" logging.info(f" Writing the file {txt_file_name}") - convert_csv_to_pretty_txt(csv_file_name, txt_file_name, delimiter=u",") + try: + convert_csv_to_pretty_txt(csv_file_name, txt_file_name, delimiter=u",") + except Exception as err: + logging.error(repr(err)) + for hdr in header: + logging.info(",".join(hdr)) + for test in tbl_lst: + logging.info(",".join( + [ + str(item).replace(u"None", u"-").replace(u"nan", u"-"). + replace(u"null", u"-") for item in test + ] + )) # Reorganize header in txt table txt_table = list() |