Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: consider that some outputs might not be defined
  • Loading branch information
oesteban committed Mar 8, 2020
commit 4e1d601e0c52187340bcc07bc8651376d3c31533
4 changes: 3 additions & 1 deletion nipype/interfaces/mixins/fixheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def _post_run_hook(self, runtime):

inputs = self.inputs.get_traitsfree()
outputs = self.aggregate_outputs(runtime=runtime).get_traitsfree()
for out, inp in self._copy_header_map.items():
defined_outputs = set(outputs.keys()).intersection(self._copy_header_map.keys())
for out in defined_outputs:
inp = self._copy_header_map[out]
keep_dtype = True
if isinstance(inp, tuple):
inp, keep_dtype = inp
Expand Down