aboutsummaryrefslogtreecommitdiffstats
path: root/resources
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:26 +0000
commit4d6dcbbbb9103f15fb55d525f14964c2323c2a03 (patch)
tree597a3625fd6c2b346c651b2cacc9f3c092a1517b /resources
parent0e835cca6f7dbb1b8c3c0a0356ae7546aa5258bf (diff)
PAL: Remove temporary pdf files
Change-Id: I65cf505edd346fc5da240be08310064b3755e458 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources')
-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.")