From 3f6a409881cfabf7dc85798fc6451b138b4feb2e Mon Sep 17 00:00:00 2001 From: Dawn Smith Date: Tue, 12 Nov 2024 17:28:18 -0500 Subject: [PATCH] [FIX] Ensure outputs actually removed when --remake used --- bin/dm_qc_report.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/dm_qc_report.py b/bin/dm_qc_report.py index 5a548b3a..59cfd138 100755 --- a/bin/dm_qc_report.py +++ b/bin/dm_qc_report.py @@ -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__":