Skip to content

Commit 09e7d54

Browse files
committed
Merge branch 'master' of [email protected]:nipy/nipype.git
2 parents 437ace4 + d9cf26d commit 09e7d54

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

nipype/interfaces/io.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ class DataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
130130

131131
def __setattr__(self, key, value):
132132
if key not in self.copyable_trait_names():
133+
if not isdefined(value):
134+
super(DataSinkInputSpec, self).__setattr__(key, value)
133135
self._outputs[key] = value
134136
else:
135137
if key in self._outputs:

nipype/interfaces/tests/test_io.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def test_datasink():
2323
yield assert_equal, ds.inputs._outputs, {}
2424
ds = nio.DataSink(base_directory = 'foo')
2525
yield assert_equal, ds.inputs.base_directory, 'foo'
26+
ds = nio.DataSink(infields=['test'])
27+
yield assert_true, 'test' in ds.inputs.copyable_trait_names()
2628

2729
def test_datasink_substitutions():
2830
indir = mkdtemp(prefix='-Tmp-nipype_ds_subs_in')

0 commit comments

Comments
 (0)