Skip to content

Commit a07a68d

Browse files
committed
change: do not catch unknown errors
1 parent 1a353c5 commit a07a68d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

fmriprep/cli/run.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,7 @@ def build_workflow(opts, retval):
514514
if opts.clean_workdir:
515515
from niworkflows.utils.misc import clean_directory
516516
build_log.log("Clearing previous fMRIPrep working directory: %s" % work_dir)
517-
try:
518-
success = clean_directory(work_dir)
519-
except Exception:
520-
success = False
521-
if not success:
517+
if not clean_directory(work_dir):
522518
build_log.warning("Could not clear all contents of working directory: %s" % work_dir)
523519

524520
retval['return_code'] = 1

0 commit comments

Comments
 (0)