Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] bitbake-worker: Simple code cleanup
@ 2015-09-08 22:36 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-09-08 22:36 UTC (permalink / raw)
  To: bitbake-devel

start/end are unused here and we can improve the code conditional blocks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 305f87c..df59953 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -296,13 +296,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)




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-08 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08 22:36 [PATCH] bitbake-worker: Simple code cleanup Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox