Skip to content

Commit e677731

Browse files
committed
remove files if no NeXus file with default plot was provided
1 parent 3236111 commit e677731

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/pynxtools_em/examples/oasisb/batch_process.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,11 @@ def process_task(
445445
if not has_default_plot:
446446
logger.warning(f"Deleting {output_file_path} as it has no default plot")
447447
trg = f"{target_directory}{os.sep}{nexus_file_name_prefix}.{mime_type}"
448-
for sfx in [".nxs", ".oasis.specific.yaml", ".csv"]:
448+
for sfx in [".nxs", ".csv"]:
449449
if os.path.isfile(f"{trg}{sfx}"):
450450
os.remove(f"{trg}{sfx}")
451+
if os.path.isfile(eln_file_path):
452+
os.remove(eln_file_path)
451453
return
452454

453455
# gc.collect()

0 commit comments

Comments
 (0)