Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Evan Edmond
fslpy
Commits
806e5dcd
Commit
806e5dcd
authored
Sep 19, 2019
by
Michiel Cottaar
Browse files
REF: recalled _prepareArgs as prepareArgs
parent
fac47610
Changes
2
Hide whitespace changes
Inline
Side-by-side
fsl/utils/fslsub.py
View file @
806e5dcd
...
...
@@ -104,7 +104,7 @@ def submit(*command,
:return: string of submitted job id
"""
from
fsl.utils.run
import
runfsl
,
_
prepareArgs
from
fsl.utils.run
import
runfsl
,
prepareArgs
base_cmd
=
[
'fsl_sub'
]
...
...
@@ -135,7 +135,7 @@ def submit(*command,
base_cmd
.
append
(
'-s'
)
base_cmd
.
extend
(
multi_threaded
)
base_cmd
.
extend
(
_
prepareArgs
(
command
))
base_cmd
.
extend
(
prepareArgs
(
command
))
return
runfsl
(
*
base_cmd
).
strip
()
...
...
fsl/utils/run.py
View file @
806e5dcd
...
...
@@ -72,7 +72,7 @@ def dryrun(*args):
DRY_RUN
=
oldval
def
_
prepareArgs
(
args
):
def
prepareArgs
(
args
):
"""Used by the :func:`run` function. Ensures that the given arguments is a
list of strings.
"""
...
...
@@ -179,7 +179,7 @@ def run(*args, **kwargs):
logStdout
=
log
.
get
(
'stdout'
,
None
)
logStderr
=
log
.
get
(
'stderr'
,
None
)
logCmd
=
log
.
get
(
'cmd'
,
None
)
args
=
_
prepareArgs
(
args
)
args
=
prepareArgs
(
args
)
if
not
bool
(
submit
):
submit
=
None
...
...
@@ -345,7 +345,7 @@ def runfsl(*args, **kwargs):
if
not
prefixes
:
raise
FSLNotPresent
(
'$FSLDIR is not set - FSL cannot be found!'
)
args
=
_
prepareArgs
(
args
)
args
=
prepareArgs
(
args
)
for
prefix
in
prefixes
:
cmdpath
=
op
.
join
(
prefix
,
args
[
0
])
if
op
.
isfile
(
cmdpath
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment