Skip to content

Commit 799dfab

Browse files
committed
@effigies' and @satra's comments
1 parent 4d4d3f0 commit 799dfab

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

nipype/interfaces/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,11 +1467,11 @@ class must be instantiated with a command argument
14671467
>>> cli.cmdline # doctest: +ALLOW_UNICODE
14681468
'ls -al'
14691469
1470-
>>> pprint.pprint(cli.inputs.trait_get()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE
1470+
# Use get_traitsfree() to check all inputs set
1471+
>>> pprint.pprint(cli.inputs.get_traitsfree()) # doctest: +NORMALIZE_WHITESPACE +ALLOW_UNICODE
14711472
{'args': '-al',
14721473
'environ': {'DISPLAY': ':1'},
1473-
'ignore_exception': False,
1474-
'terminal_output': <undefined>}
1474+
'ignore_exception': False}
14751475
14761476
>>> cli.inputs.get_hashval()[0][0] # doctest: +ALLOW_UNICODE
14771477
('args', '-al')
@@ -1638,7 +1638,7 @@ def _format_arg(self, name, trait_spec, value):
16381638
# Depending on whether we stick with traitlets, and whether or
16391639
# not we beef up traitlets.List, we may want to put some
16401640
# type-checking code here as well
1641-
sep = trait_spec.sep or ' '
1641+
sep = trait_spec.sep if trait_spec.sep is not None else ' '
16421642

16431643
if argstr.endswith('...'):
16441644
# repeatable option

nipype/pipeline/plugins/multiproc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ def _submit_job(self, node, updatehash=False):
139139
self._taskid += 1
140140

141141
# Don't allow streaming outputs
142-
if hasattr(node.interface, 'terminal_output') and \
143-
node.interface.terminal_output == 'stream':
144-
node.interface.terminal_output = 'allatonce'
142+
if getattr(node, 'terminal_output', '') == 'stream':
143+
node.terminal_output = 'allatonce'
145144

146145
self._task_obj[self._taskid] = self.pool.apply_async(
147146
run_node, (node, updatehash, self._taskid),

0 commit comments

Comments
 (0)