Skip to content

Commit ae71ef4

Browse files
committed
Add check for result=None in clean_queue
1 parent 9eaa2a3 commit ae71ef4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,7 @@ def run(self, graph, config, updatehash=False):
156156
notrun.append(
157157
self._clean_queue(
158158
jobid,
159-
graph,
160-
result={
161-
'result': None,
162-
'traceback': '\n'.join(format_exception(*sys.exc_info()))
163-
}))
159+
graph))
164160
else:
165161
if result:
166162
if result['traceback']:
@@ -222,6 +218,9 @@ def _clean_queue(self, jobid, graph, result=None):
222218

223219
if self._status_callback:
224220
self._status_callback(self.procs[jobid], 'exception')
221+
if result is None:
222+
result={'result': None,
223+
'traceback': '\n'.join(format_exception(*sys.exc_info()))}
225224

226225
if str2bool(self._config['execution']['stop_on_first_crash']):
227226
raise RuntimeError("".join(result['traceback']))

0 commit comments

Comments
 (0)