Skip to content

Commit c693396

Browse files
committed
fix exceptions
1 parent d210791 commit c693396

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cwltool/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,16 @@ def output_callback(out, processStatus):
278278

279279
fetch_iter_lock = threading.Lock()
280280
threads = set()
281-
exception = None
281+
exceptions = []
282282

283283
def run_job(job):
284284
def runner():
285285
try:
286286
job.run(**kwargs)
287287
except WorkflowException as e:
288-
exception = e
288+
exceptions.append(e)
289289
except Exception as e:
290-
exception = WorkflowException(Text(e))
290+
exceptions.append(WorkflowException(Text(e)))
291291

292292
threads.remove(thread)
293293

@@ -303,8 +303,8 @@ def wait_for_next_completion():
303303
fetch_iter_lock.acquire()
304304
fetch_iter_lock.acquire()
305305
fetch_iter_lock.release()
306-
if exception is not None:
307-
raise exception
306+
if exceptions:
307+
raise exceptions[0]
308308

309309
jobiter = t.job(job_order_object, output_callback, **kwargs)
310310

0 commit comments

Comments
 (0)