From 720147e802c026e0ff53874e51c11ea7b40939b4 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 7 Dec 2021 17:29:31 -0700 Subject: [PATCH] lf_qa.py : updated exceptions to print out reasonable explantions Signed-off-by: Chuck SmileyRekiere --- py-scripts/tools/lf_qa.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/py-scripts/tools/lf_qa.py b/py-scripts/tools/lf_qa.py index 8617c113..5f9a58c2 100755 --- a/py-scripts/tools/lf_qa.py +++ b/py-scripts/tools/lf_qa.py @@ -331,10 +331,14 @@ class csv_sql: # generate png image try: kpi_fig.write_image(png_path, scale=1, width=1200, height=300) - except BaseException: - print( - "ERROR: {database} Was correct database passed in, moved or duplicates of same name?".format( - database=self.database)) + except ValueError as err: + print("{msg}".format(msg=err)) + print("ValueError on kpi_fig.write_image exiting") + exit(1) + except BaseException as err: + print("{msg}".format(msg=err)) + print("BaseException on kpi_fig.write_image exiting") + exit(1) # generate html image (interactive) kpi_fig.write_html(html_path) img_kpi_html_path = self.server + html_path