Protect against builds dict changing while we iterate
As we check for lost builds, the builds dict can change which throws an exception. Change-Id: I63d042d6b64fe8fb1a755da067df420d52c9eea5
This commit is contained in:
parent
b58820536f
commit
6150ebc49d
|
@ -445,7 +445,9 @@ class ExecutorClient(object):
|
|||
|
||||
def lookForLostBuilds(self):
|
||||
self.log.debug("Looking for lost builds")
|
||||
for build in self.builds.values():
|
||||
# Construct a list from the values iterator to protect from it changing
|
||||
# out from underneath us.
|
||||
for build in list(self.builds.values()):
|
||||
if build.result:
|
||||
# The build has finished, it will be removed
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue