]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake-worker: Simple code cleanup
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Sep 2015 22:36:49 +0000 (23:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Sep 2015 13:26:55 +0000 (14:26 +0100)
start/end are unused here and we can improve the code conditional blocks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake-worker

index 96a4d4cdec761206b6d75efdd0804cc28e3ee6f1..c429dc76d7563234dcdaae08ec8ebd0826fbad16 100755 (executable)
@@ -295,13 +295,12 @@ class BitbakeWorker(object):
     def serve(self):        
         while True:
             (ready, _, _) = select.select([self.input] + [i.input for i in self.build_pipes.values()], [] , [], 1)
-            if self.input in ready or len(self.queue):
-                start = len(self.queue)
+            if self.input in ready:
                 try:
                     self.queue = self.queue + self.input.read()
                 except (OSError, IOError):
                     pass
-                end = len(self.queue)
+            if len(self.queue):
                 self.handle_item("cookerconfig", self.handle_cookercfg)
                 self.handle_item("workerdata", self.handle_workerdata)
                 self.handle_item("runtask", self.handle_runtask)