Skip to content

Commit bb736ae

Browse files
oestebaneffigies
andauthored
Apply suggestions from code review
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
1 parent 259e7bc commit bb736ae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nipype/interfaces/base/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
465465
_na_outputs = self._check_version_requirements(outputs)
466466
na_names = aggregate_names.intersection(_na_outputs)
467467
if na_names:
468-
raise TypeError("""\
468+
# XXX Change to TypeError in Nipype 2.0
469+
raise KeyError("""\
469470
Output trait(s) %s not available in version %s of interface %s.\
470471
""" % (', '.join(na_names), self.version, self.__class__.__name__))
471472

nipype/interfaces/base/tests/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def _list_outputs(self):
289289
return {'foo': 1}
290290

291291
obj = DerivedInterface1()
292-
with pytest.raises(TypeError):
292+
with pytest.raises(KeyError):
293293
obj.run()
294294

295295

0 commit comments

Comments
 (0)