Remove previous report before move

pull/1708/head
Piero Toffanin 2023-10-14 01:22:58 -04:00
rodzic 38af615657
commit 6dc0c98fa0
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -559,6 +559,8 @@ class OSFMContext:
pdf_report.save_report("report.pdf")
if os.path.exists(osfm_report_path):
if os.path.exists(report_path):
os.unlink(report_path)
shutil.move(osfm_report_path, report_path)
else:
log.ODM_WARNING("Report could not be generated")