Skip to content
Snippets Groups Projects
Commit 9a5e4fa3 authored by Michiel Cottaar's avatar Michiel Cottaar Committed by Paul McCarthy
Browse files

BUG: also allow job-ids to be integers

parent 3287a371
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment