diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-09 17:34:20 +0100 |
---|---|---|
committer | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-10 16:18:26 +0100 |
commit | e4d2b492243c5acac4d272637757e10f1552e098 (patch) | |
tree | 76ec059b88b88b8ca013355de7460015f9ab8baf | |
parent | 34d501395de855cae9dbe2493831f7b2ffb7788d (diff) | |
download | buildstream-e4d2b492243c5acac4d272637757e10f1552e098.tar.gz |
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.
-rw-r--r-- | src/buildstream/_scheduler/queues/trackqueue.py | 7 |
1 files 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() |