Skip to content

Commit

Permalink
[FIX] Ensure outputs actually removed when --remake used
Browse files Browse the repository at this point in the history
  • Loading branch information
DESm1th committed Nov 12, 2024
1 parent 59f882c commit 3f6a409
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/dm_qc_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,12 @@ def add_scan_length(nii_path, scan):


def remove_outputs(metric):
for item in metric.outputs:
try:
os.remove(item)
except FileNotFoundError:
pass
for command in metric.outputs:
for item in metric.outputs[command]:
try:
os.remove(item)
except FileNotFoundError:
pass


if __name__ == "__main__":
Expand Down

0 comments on commit 3f6a409

Please sign in to comment.