Commit 8c5f54fb authored by Martin Craig's avatar Martin Craig
Browse files

Remove all standard keyword argument and pass them to the run function separately

parent c3a9ebac
......@@ -141,11 +141,13 @@ def cmdwrapper(func):
:func:`fsl.utils.run.run` function in a standardised manner.
"""
def wrapper(*args, **kwargs):
stdout = kwargs.pop('stdout', True)
stderr = kwargs.pop('stderr', False)
exitcode = kwargs.pop('exitcode', False)
submit = kwargs.pop('submit', None)
stderr = kwargs.pop('stderr', True)
log = kwargs.pop('log', {'tee' : True})
cmd = func(*args, **kwargs)
return run.run(cmd, stderr=stderr, log=log, submit=submit)
return run.run(cmd, stderr=stderr, log=log, submit=submit, stdout=stdout, exitcode=exitcode)
return _update_wrapper(wrapper, func)
......@@ -155,11 +157,13 @@ def fslwrapper(func):
:func:`fsl.utils.run.runfsl` function in a standardised manner.
"""
def wrapper(*args, **kwargs):
stdout = kwargs.pop('stdout', True)
stderr = kwargs.pop('stderr', False)
exitcode = kwargs.pop('exitcode', False)
submit = kwargs.pop('submit', None)
stderr = kwargs.pop('stderr', True)
log = kwargs.pop('log', {'tee' : True})
cmd = func(*args, **kwargs)
return run.runfsl(cmd, stderr=stderr, log=log, submit=submit)
return run.runfsl(cmd, stderr=stderr, log=log, submit=submit, stdout=stdout, exitcode=exitcode)
return _update_wrapper(wrapper, func)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment