Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
9a5e4fa3
Commit
9a5e4fa3
authored
6 years ago
by
Michiel Cottaar
Committed by
Paul McCarthy
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
BUG: also allow job-ids to be integers
parent
3287a371
No related branches found
Branches containing commit
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
-0
2 additions, 0 deletions
fsl/utils/fslsub.py
tests/test_fslsub.py
+1
-1
1 addition, 1 deletion
tests/test_fslsub.py
with
3 additions
and
1 deletion
fsl/utils/fslsub.py
+
2
−
0
View file @
9a5e4fa3
...
...
@@ -225,6 +225,8 @@ def _flatten_job_ids(job_ids):
"""
Unpack the (nested) job-ids in a single set
"""
if
isinstance
(
job_ids
,
str
):
return
{
job_ids
}
elif
isinstance
(
job_ids
,
int
):
return
{
str
(
job_ids
)}
else
:
res
=
set
()
for
job_id
in
job_ids
:
...
...
This diff is collapsed.
Click to expand it.
tests/test_fslsub.py
+
1
−
1
View file @
9a5e4fa3
...
...
@@ -9,7 +9,7 @@ from fsl.utils import fslsub
def
test_flatten_jobids
():
job_ids
=
(
'
12
'
,
'
27
'
,
'
35
'
,
'
41
'
,
'
721
'
)
job_ids
=
(
'
12
'
,
'
27
'
,
'
35
'
,
'
41
'
,
721
)
res
=
'
12,27,35,41,721
'
assert
fslsub
.
_flatten_job_ids
(
job_ids
)
==
res
...
...
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