diff --git a/fsl/utils/fslsub.py b/fsl/utils/fslsub.py index d679a3a3a80c347f97be9092da6d7c466564e02b..713826a8c26637cc99159abeda423b2b6e1fba82 100644 --- a/fsl/utils/fslsub.py +++ b/fsl/utils/fslsub.py @@ -202,10 +202,8 @@ def wait(job_ids): :arg job_ids: string or tuple of strings with jobs that should finish before continuing """ - if isinstance(job_ids, string_types): - job_ids = (job_ids, ) start_time = time.time() - for job_id in job_ids: + for job_id in _flatten_job_ids(job_ids): log.debug('Waiting for job {}'.format(job_id)) while len(info(job_id)) > 0: wait_time = min(max(1, (time.time() - start_time) / 3.), 20)