Commit 3c7bff49 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Changed default stream handling for cmdwrapper/fslwrapper decorators

parent 257f6b80
......@@ -142,8 +142,10 @@ def cmdwrapper(func):
"""
def wrapper(*args, **kwargs):
submit = kwargs.pop('submit', None)
cmd = func(*args, **kwargs)
return run.run(cmd, err=True, submit=submit)
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 _update_wrapper(wrapper, func)
......@@ -154,8 +156,10 @@ def fslwrapper(func):
"""
def wrapper(*args, **kwargs):
submit = kwargs.pop('submit', None)
cmd = func(*args, **kwargs)
return run.runfsl(cmd, err=True, submit=submit)
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 _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