From bc3a206de379de5d79af2a08b9b8ff56ae06e68d Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 15 Jul 2016 20:54:30 +1200 Subject: bitbake: 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. (Bitbake rev: 59cb919e5cd5c653fb4d69b2d6a4320648443e10) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/uihelper.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/ui') diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py index 1915e47703..f64fa18ec2 100644 --- a/bitbake/lib/bb/ui/uihelper.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf