From e4d2b492243c5acac4d272637757e10f1552e098 Mon Sep 17 00:00:00 2001 From: Darius Makovsky Date: Mon, 9 Sep 2019 17:34:20 +0100 Subject: Check result is not None in tracking queue done() The tracking queue is the only queue implementing `done()` which requires the result to be iterable. If there is no result from the job this will hit a TypeError. --- src/buildstream/_scheduler/queues/trackqueue.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/buildstream/_scheduler/queues/trackqueue.py b/src/buildstream/_scheduler/queues/trackqueue.py index 6bdf838f9..3700f3406 100644 --- a/src/buildstream/_scheduler/queues/trackqueue.py +++ b/src/buildstream/_scheduler/queues/trackqueue.py @@ -55,9 +55,10 @@ class TrackQueue(Queue): # Set the new refs in the main process one by one as they complete, # writing to bst files this time - for unique_id, new_ref in result: - source = Plugin._lookup(unique_id) - source._set_ref(new_ref, save=True) + if result is not None: + for unique_id, new_ref in result: + source = Plugin._lookup(unique_id) + source._set_ref(new_ref, save=True) element._tracking_done() -- cgit v1.2.1