Skip to content

Commit fd73828

Browse files
committed
RF: Deduplication
1 parent db948e8 commit fd73828

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

fmriprep/cli/run.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,14 @@ def main():
224224
write_bidsignore(config.execution.fmriprep_dir)
225225

226226
if failed_reports:
227-
config.loggers.cli.error(
228-
"Report generation was not successful for the following participants : %s.",
229-
", ".join(failed_reports),
227+
msg = (
228+
'Report generation was not successful for the following participants '
229+
f': {", ".join(failed_reports)}.'
230230
)
231+
config.loggers.cli.error(msg)
232+
if sentry_sdk is not None:
233+
sentry_sdk.capture_message(msg, level="error")
231234

232-
if sentry_sdk is not None and failed_reports:
233-
sentry_sdk.capture_message(
234-
"Report generation was not successful for the following participants : %s.",
235-
", ".join(failed_reports),
236-
level="error",
237-
)
238235
sys.exit(int((errno + len(failed_reports)) > 0))
239236

240237

0 commit comments

Comments
 (0)