Skip to content

Commit 79fe4e2

Browse files
committed
Reinstate logic in the except block, including using unused variable.
1 parent fa1fa0f commit 79fe4e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dmriprep/cli/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,10 @@ def main():
304304
try:
305305
dmriprep_wf.run(**plugin_settings)
306306
except Exception as e:
307-
popylar.track_event(__ga_id__, 'run', 'cli_error')
308-
raise
307+
if not opts.notrack:
308+
popylar.track_event(__ga_id__, 'run', 'cli_error')
309+
logger.critical('dMRIPrep failed: %s', e)
310+
raise e
309311
else:
310312
if opts.run_reconall:
311313
from templateflow import api

0 commit comments

Comments
 (0)