summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-10-06 21:07:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-09 12:33:26 +0100
commitf4366293ff625a50264d31b47f6ce4d983cac852 (patch)
tree9e4e0853ab61bda540b7ad345b1aab9e6d0272a8 /bitbake
parent31aafe68523f4ee9cf2301929b7df11b9b2c05e8 (diff)
downloadpoky-f4366293ff625a50264d31b47f6ce4d983cac852.tar.gz
bitbake: bb.runqueue: fix unexpected process death logic
`if w in self.rq.worker` when w *is* self.rq.worker doesn't make a great deal of sense, and results in this error: File ".../poky/bitbake/lib/bb/runqueue.py", line 2372, in runQueuePipe.read(): name = None > if w in self.rq.worker: name = "Worker" TypeError: unhashable type: 'dict' Most likely this was meant to be 'is' rather than 'in', but rather than checking after the fact, just include the name in the iteration, instead. While we're here, also clean up and fix the broken error message. (Bitbake rev: 267e025cad44c8bd0fb157f1f7a2e08df117ba84) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 15716398f0..df7c50fe96 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2365,16 +2365,11 @@ class runQueuePipe():
2365 self.rqexec = rqexec 2365 self.rqexec = rqexec
2366 2366
2367 def read(self): 2367 def read(self):
2368 for w in [self.rq.worker, self.rq.fakeworker]: 2368 for workers, name in [(self.rq.worker, "Worker"), (self.rq.fakeworker, "Fakeroot")]:
2369 for mc in w: 2369 for worker in workers.values():
2370 w[mc].process.poll() 2370 worker.process.poll()
2371 if w[mc].process.returncode is not None and not self.rq.teardown: 2371 if worker.process.returncode is not None and not self.rq.teardown:
2372 name = None 2372 bb.error("%s process (%s) exited unexpectedly (%s), shutting down..." % (name, worker.process.pid, str(worker.process.returncode)))
2373 if w in self.rq.worker:
2374 name = "Worker"
2375 elif w in self.rq.fakeworker:
2376 name = "Fakeroot"
2377 bb.error("%s process (%s) exited unexpectedly (%s), shutting down..." % (name, w.pid, str(w.returncode)))
2378 self.rq.finish_runqueue(True) 2373 self.rq.finish_runqueue(True)
2379 2374
2380 start = len(self.queue) 2375 start = len(self.queue)