]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: runqueue: Don't error if we never setup workers
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Mar 2014 15:03:51 +0000 (15:03 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Mar 2014 15:04:46 +0000 (15:04 +0000)
If we didn't setup any workers (such as bitbake -S), this would error
since we're trying to set a signal handler to None. This patch
avoids that problem.

(Bitbake rev: ce17478c8197abf178c00774f5bbe23fd4375ee2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/runqueue.py

index a30f594e44fbdf0c7760745533929462d3415530..3c72b60f5052b11c3813cd46a2a2423ffa9e7036 100644 (file)
@@ -947,7 +947,8 @@ class RunQueue:
 
     def teardown_workers(self):
         self.teardown = True
-        signal.signal(signal.SIGCHLD, self.oldsigchld)
+        if self.oldsigchld:
+            signal.signal(signal.SIGCHLD, self.oldsigchld)
         self._teardown_worker(self.worker, self.workerpipe)
         self.worker = None
         self.workerpipe = None