reuse variable for log file path

This commit is contained in:
Arturo Albacete 2024-01-16 19:11:28 +01:00
parent a75dfe1c0d
commit 315e40a49c

View File

@ -107,7 +107,7 @@ def save_files(js_data, images, do_make_zip, index):
if os.path.exists(logfile_path): if os.path.exists(logfile_path):
update_logfile(logfile_path, fields) update_logfile(logfile_path, fields)
with open(os.path.join(shared.opts.outdir_save, "log.csv"), "a", encoding="utf8", newline='') as file: with open(logfile_path, "a", encoding="utf8", newline='') as file:
at_start = file.tell() == 0 at_start = file.tell() == 0
writer = csv.writer(file) writer = csv.writer(file)
if at_start: if at_start: