aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-11-20 12:11:41 +0100
committerTibor Frank <tifrank@cisco.com>2020-11-20 13:33:04 +0000
commit13b2d0e529f56a4ecd6915cc466590cb0547cc42 (patch)
treed223d5a9ce103d85d8221d164d0f5f5376cd94e1
parent7e1f3e04e80abdca1ac42735bca341a862ae89b7 (diff)
PAL: Remove temporary pdf files
Change-Id: I65cf505edd346fc5da240be08310064b3755e458 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit 4d6dcbbbb9103f15fb55d525f14964c2323c2a03)
-rw-r--r--resources/tools/presentation/generator_report.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py
index 0712b78ef0..142c264bcd 100644
--- a/resources/tools/presentation/generator_report.py
+++ b/resources/tools/presentation/generator_report.py
@@ -195,8 +195,10 @@ def generate_pdf_report(release, spec, report_week):
plots.extend(
get_files(spec.environment[u"paths"][u"DIR[STATIC,DPDK]"], u"html")
)
+ pdf_plots = list()
for plot in plots:
file_name = f"{plot.rsplit(u'.', 1)[0]}.pdf"
+ pdf_plots.append(file_name)
logging.info(f"Converting {plot} to {file_name}")
execute_command(convert_plots.format(html=plot, pdf=file_name))
@@ -224,6 +226,10 @@ def generate_pdf_report(release, spec, report_week):
for cmd in cmds:
execute_command(cmd)
+ # Delete temporary pdf files:
+ for plot in pdf_plots:
+ execute_command(f"rm {plot}")
+
logging.info(u" Done.")