Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
806e5dcd
Commit
806e5dcd
authored
5 years ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
REF: recalled _prepareArgs as prepareArgs
parent
fac47610
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/utils/fslsub.py
+2
-2
2 additions, 2 deletions
fsl/utils/fslsub.py
fsl/utils/run.py
+3
-3
3 additions, 3 deletions
fsl/utils/run.py
with
5 additions
and
5 deletions
fsl/utils/fslsub.py
+
2
−
2
View file @
806e5dcd
...
@@ -104,7 +104,7 @@ def submit(*command,
...
@@ -104,7 +104,7 @@ def submit(*command,
:return: string of submitted job id
:return: string of submitted job id
"""
"""
from
fsl.utils.run
import
runfsl
,
_
prepareArgs
from
fsl.utils.run
import
runfsl
,
prepareArgs
base_cmd
=
[
'
fsl_sub
'
]
base_cmd
=
[
'
fsl_sub
'
]
...
@@ -135,7 +135,7 @@ def submit(*command,
...
@@ -135,7 +135,7 @@ def submit(*command,
base_cmd
.
append
(
'
-s
'
)
base_cmd
.
append
(
'
-s
'
)
base_cmd
.
extend
(
multi_threaded
)
base_cmd
.
extend
(
multi_threaded
)
base_cmd
.
extend
(
_
prepareArgs
(
command
))
base_cmd
.
extend
(
prepareArgs
(
command
))
return
runfsl
(
*
base_cmd
).
strip
()
return
runfsl
(
*
base_cmd
).
strip
()
...
...
This diff is collapsed.
Click to expand it.
fsl/utils/run.py
+
3
−
3
View file @
806e5dcd
...
@@ -72,7 +72,7 @@ def dryrun(*args):
...
@@ -72,7 +72,7 @@ def dryrun(*args):
DRY_RUN
=
oldval
DRY_RUN
=
oldval
def
_
prepareArgs
(
args
):
def
prepareArgs
(
args
):
"""
Used by the :func:`run` function. Ensures that the given arguments is a
"""
Used by the :func:`run` function. Ensures that the given arguments is a
list of strings.
list of strings.
"""
"""
...
@@ -179,7 +179,7 @@ def run(*args, **kwargs):
...
@@ -179,7 +179,7 @@ def run(*args, **kwargs):
logStdout
=
log
.
get
(
'
stdout
'
,
None
)
logStdout
=
log
.
get
(
'
stdout
'
,
None
)
logStderr
=
log
.
get
(
'
stderr
'
,
None
)
logStderr
=
log
.
get
(
'
stderr
'
,
None
)
logCmd
=
log
.
get
(
'
cmd
'
,
None
)
logCmd
=
log
.
get
(
'
cmd
'
,
None
)
args
=
_
prepareArgs
(
args
)
args
=
prepareArgs
(
args
)
if
not
bool
(
submit
):
if
not
bool
(
submit
):
submit
=
None
submit
=
None
...
@@ -345,7 +345,7 @@ def runfsl(*args, **kwargs):
...
@@ -345,7 +345,7 @@ def runfsl(*args, **kwargs):
if
not
prefixes
:
if
not
prefixes
:
raise
FSLNotPresent
(
'
$FSLDIR is not set - FSL cannot be found!
'
)
raise
FSLNotPresent
(
'
$FSLDIR is not set - FSL cannot be found!
'
)
args
=
_
prepareArgs
(
args
)
args
=
prepareArgs
(
args
)
for
prefix
in
prefixes
:
for
prefix
in
prefixes
:
cmdpath
=
op
.
join
(
prefix
,
args
[
0
])
cmdpath
=
op
.
join
(
prefix
,
args
[
0
])
if
op
.
isfile
(
cmdpath
):
if
op
.
isfile
(
cmdpath
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment