summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2010-12-09 11:31:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-24 15:53:58 +0000
commitedd64c7e864cfe68d01a410a021d6bb1d7cf2c27 (patch)
tree255b981428b951d52b2c3c14923e18ae5b9d9607 /bitbake/lib
parentfebb7f263289a8137bbf2f9cd2d47c30cb75cbb8 (diff)
downloadpoky-edd64c7e864cfe68d01a410a021d6bb1d7cf2c27.tar.gz
bitbake/server/none: fix getEvent() to return events
In the none server, events don't get processed unless the idle_commands function gets called, which previously wasn't happening with getEvent(); thus UIs that use this to get events were not working. Fixes [BUGID #561] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/server/none.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 356eea3011..45cda2f5f4 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -79,18 +79,22 @@ class BBUIEventQueue:
79 self.BBServer = BBServer 79 self.BBServer = BBServer
80 self.EventHandle = bb.event.register_UIHhandler(self) 80 self.EventHandle = bb.event.register_UIHhandler(self)
81 81
82 def getEvent(self): 82 def __popEvent(self):
83 if len(self.eventQueue) == 0: 83 if len(self.eventQueue) == 0:
84 return None 84 return None
85
86 return self.eventQueue.pop(0) 85 return self.eventQueue.pop(0)
87 86
87 def getEvent(self):
88 if len(self.eventQueue) == 0:
89 self.BBServer.idle_commands(0)
90 return self.__popEvent()
91
88 def waitEvent(self, delay): 92 def waitEvent(self, delay):
89 event = self.getEvent() 93 event = self.__popEvent()
90 if event: 94 if event:
91 return event 95 return event
92 self.BBServer.idle_commands(delay) 96 self.BBServer.idle_commands(delay)
93 return self.getEvent() 97 return self.__popEvent()
94 98
95 def queue_event(self, event): 99 def queue_event(self, event):
96 self.eventQueue.append(event) 100 self.eventQueue.append(event)