Skip to content

Commit 448b875

Browse files
committed
Revert "removing terminal_output from CommandLine call (ignore_exception is deprecated)"
This reverts commit 708ac1c.
1 parent 708ac1c commit 448b875

File tree

17 files changed

+42
-21
lines changed

17 files changed

+42
-21
lines changed

nipype/interfaces/afni/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def standard_image(img_name):
8787
Could be made more fancy to allow for more relocatability'''
8888
clout = CommandLine(
8989
'which afni',
90-
resource_monitor=False).run()
90+
resource_monitor=False,
91+
terminal_output='allatonce').run()
9192
if clout.runtime.returncode is not 0:
9293
return None
9394

nipype/interfaces/base/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,8 @@ def version(klass):
13141314
try:
13151315
clout = CommandLine(
13161316
command=klass.version_cmd,
1317-
resource_monitor=False).run()
1317+
resource_monitor=False,
1318+
terminal_output='allatonce').run()
13181319
except IOError:
13191320
return None
13201321

nipype/interfaces/diffusion_toolkit/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def version():
4848
Version number as string or None if FSL not found
4949
5050
"""
51-
clout = CommandLine(command='dti_recon').run()
51+
clout = CommandLine(
52+
command='dti_recon', terminal_output='allatonce').run()
5253

5354
if clout.runtime.returncode is not 0:
5455
return None

nipype/interfaces/matlab.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def get_matlab_command():
2525
res = CommandLine(
2626
command='which',
2727
args=matlab_cmd,
28-
resource_monitor=False).run()
28+
resource_monitor=False,
29+
terminal_output='allatonce').run()
2930
matlab_path = res.runtime.stdout.strip()
3031
except Exception:
3132
return None

nipype/interfaces/minc/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def version():
5656
try:
5757
clout = CommandLine(
5858
command='mincinfo',
59-
args='-version').run()
59+
args='-version',
60+
terminal_output='allatonce').run()
6061
except IOError:
6162
return None
6263

nipype/pipeline/engine/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,8 @@ def _run_dot(dotfilename, format_ext):
13381338
dot_base = os.path.splitext(dotfilename)[0]
13391339
formatted_dot = '{}.{}'.format(dot_base, format_ext)
13401340
cmd = 'dot -T{} -o"{}" "{}"'.format(format_ext, formatted_dot, dotfilename)
1341-
res = CommandLine(cmd, resource_monitor=False).run()
1341+
res = CommandLine(cmd, terminal_output='allatonce',
1342+
resource_monitor=False).run()
13421343
return formatted_dot, res
13431344

13441345

nipype/pipeline/plugins/condor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, **kwargs):
4949

5050
def _is_pending(self, taskid):
5151
cmd = CommandLine(
52-
'condor_q', resource_monitor=False)
52+
'condor_q', resource_monitor=False, terminal_output='allatonce')
5353
cmd.inputs.args = '%d' % taskid
5454
# check condor cluster
5555
oldlevel = iflogger.level
@@ -64,7 +64,8 @@ def _submit_batchtask(self, scriptfile, node):
6464
cmd = CommandLine(
6565
'condor_qsub',
6666
environ=dict(os.environ),
67-
resource_monitor=False)
67+
resource_monitor=False,
68+
terminal_output='allatonce')
6869
path = os.path.dirname(scriptfile)
6970
qsubargs = ''
7071
if self._qsub_args:

nipype/pipeline/plugins/dagman.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ def _submit_graph(self, pyfiles, dependencies, nodes):
158158
cmd = CommandLine(
159159
'condor_submit_dag',
160160
environ=dict(os.environ),
161-
resource_monitor=False)
161+
resource_monitor=False,
162+
terminal_output='allatonce')
162163
# needs -update_submit or re-running a workflow will fail
163164
cmd.inputs.args = '%s -update_submit %s' % (self._dagman_args,
164165
dagfilename)

nipype/pipeline/plugins/lsf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def _is_pending(self, taskid):
4848
But _is_pending should return True until a job has finished and is
4949
ready to be checked for completeness. So return True if status is
5050
either 'PEND' or 'RUN'"""
51-
cmd = CommandLine('bjobs', resource_monitor=False)
51+
cmd = CommandLine(
52+
'bjobs', resource_monitor=False, terminal_output='allatonce')
5253
cmd.inputs.args = '%d' % taskid
5354
# check lsf task
5455
oldlevel = iflogger.level
@@ -65,7 +66,8 @@ def _submit_batchtask(self, scriptfile, node):
6566
cmd = CommandLine(
6667
'bsub',
6768
environ=dict(os.environ),
68-
resource_monitor=False)
69+
resource_monitor=False,
70+
terminal_output='allatonce')
6971
bsubargs = ''
7072
if self._bsub_args:
7173
bsubargs = self._bsub_args

nipype/pipeline/plugins/oar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def _submit_batchtask(self, scriptfile, node):
6969
cmd = CommandLine(
7070
'oarsub',
7171
environ=dict(os.environ),
72-
resource_monitor=False)
72+
resource_monitor=False,
73+
terminal_output='allatonce')
7374
path = os.path.dirname(scriptfile)
7475
oarsubargs = ''
7576
if self._oarsub_args:

0 commit comments

Comments
 (0)