From: Cliff Brake <[email protected]>

this fixes an issue I'm seeing with srctree with the following
recipe:

http://cgit.bec-systems.com/cgit.cgi/autotools-demo/

The above recipe produces the following stack trace:

NOTE: package autotools-demo-1.0-28-g3a96627-r0: task do_install: Succeeded
FATAL: Unable to start to 'knotty' UI due to exception: 30102.
Traceback (most recent call last):
  File "/scratch/oe/oe-build/oe/bitbake/bin/bitbake", line 185, in main
    exec "return_value = " + ui + ".init(serverConnection.connection, 
serverConnection.events)"
  File "<string>", line 1, in <module>
  File "/scratch/oe/oe-build/oe/bitbake/lib/bb/ui/knotty.py", line 61, in init
    helper.eventHandler(event)
  File "/scratch/oe/oe-build/oe/bitbake/lib/bb/ui/uihelper.py", line 31, in 
eventHandler
    del self.running_tasks[event.pid]
KeyError: 30102

Signed-off-by: Cliff Brake <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
 lib/bb/ui/uihelper.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/uihelper.py b/lib/bb/ui/uihelper.py
index 698de03..6c1abe0 100644
--- a/lib/bb/ui/uihelper.py
+++ b/lib/bb/ui/uihelper.py
@@ -28,10 +28,12 @@ class BBUIHelper:
             self.running_tasks[event.pid] = { 'title' : "%s %s" % 
(event._package, event._task) }
             self.needUpdate = True
         if isinstance(event, bb.build.TaskSucceeded):
-            del self.running_tasks[event.pid]
+            if event.pid in self.running_tasks:
+                del self.running_tasks[event.pid]
             self.needUpdate = True
         if isinstance(event, bb.build.TaskFailed):
-            del self.running_tasks[event.pid]
+            if event.pid in self.running_tasks:
+                del self.running_tasks[event.pid]
             self.failed_tasks.append( { 'title' : "%s %s" % (event._package, 
event._task)})
             self.needUpdate = True
 
-- 
1.7.1

_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to