Skip to content

Commit 069efca

Browse files
committed
RF: Catch AttributeError for trait_get failure
1 parent 55df528 commit 069efca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipype/pipeline/engine/nodes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def _get_inputs(self):
532532
output_name = info[1]
533533
try:
534534
output_value = results.outputs.trait_get()[output_name]
535-
except TypeError:
535+
except AttributeError:
536536
output_value = results.outputs.dictcopy()[output_name]
537537
logger.debug('output: %s', output_name)
538538
try:

nipype/pipeline/engine/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def save_resultfile(result, cwd, name):
239239
if result.outputs:
240240
try:
241241
outputs = result.outputs.trait_get()
242-
except TypeError:
242+
except AttributeError:
243243
outputs = result.outputs.dictcopy() # outputs was a bunch
244244
result.outputs.set(**modify_paths(outputs, relative=True, basedir=cwd))
245245

@@ -294,7 +294,7 @@ def load_resultfile(path, name):
294294
if result.outputs:
295295
try:
296296
outputs = result.outputs.trait_get()
297-
except TypeError:
297+
except AttributeError:
298298
outputs = result.outputs.dictcopy() # outputs == Bunch
299299
try:
300300
result.outputs.set(

0 commit comments

Comments
 (0)