Skip to content

Commit 345e978

Browse files
committed
do not hook _nthreads_update to inputs.num_threads changes for afni interfaces that do not have the input
1 parent 2e1b2ce commit 345e978

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nipype/interfaces/afni/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ def set_default_output_type(cls, outputtype):
201201
def __init__(self, **inputs):
202202
super(AFNICommand, self).__init__(**inputs)
203203
self.inputs.on_trait_change(self._output_update, 'outputtype')
204-
self.inputs.on_trait_change(self._nthreads_update, 'num_threads')
204+
205+
if hasattr(self.inputs, 'num_threads'):
206+
self.inputs.on_trait_change(self._nthreads_update, 'num_threads')
205207

206208
if self._outputtype is None:
207209
self._outputtype = Info.outputtype()

0 commit comments

Comments
 (0)