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:32:39 +0000
commit4afdd90898a16f360e85ec9f0999ceb59acf9fa9 (patch)
tree6134bfe095095c88c8c5bb5d35f680dee85128b6
parent66226c62da4134322ded26153d3f23e654b2232b (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 0712b78..142c264 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.")