aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-15 20:54:30 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-19 08:51:45 +0100
commit59cb919e5cd5c653fb4d69b2d6a4320648443e10 (patch)
tree9646dc8bc9fbeb2e6d0a7683b45546da36c2866f /lib
parent67a7b8b021badc17d8fdf447c250e79d291e75f7 (diff)
downloadbitbake-59cb919e5cd5c653fb4d69b2d6a4320648443e10.tar.gz
knotty: avoid errors when fetching outside of a task
In a few places we use the fetcher code to fetch files outside of a task, for example uninative in OE. In that case the pid of the event is 0 and that was causing an error in BBUIHelper.eventHandler(). Check the pid and do nothing if it's 0. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/uihelper.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bb/ui/uihelper.py b/lib/bb/ui/uihelper.py
index 1915e4770..f64fa18ec 100644
--- a/lib/bb/ui/uihelper.py
+++ b/lib/bb/ui/uihelper.py
@@ -54,9 +54,10 @@ class BBUIHelper:
self.tasknumber_total = event.stats.total
self.needUpdate = True
if isinstance(event, bb.build.TaskProgress):
- self.running_tasks[event.pid]['progress'] = event.progress
- self.running_tasks[event.pid]['rate'] = event.rate
- self.needUpdate = True
+ if event.pid > 0:
+ self.running_tasks[event.pid]['progress'] = event.progress
+ self.running_tasks[event.pid]['rate'] = event.rate
+ self.needUpdate = True
def getTasks(self):
self.needUpdate = False