[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2548/8267] bitbake: uihelper: use elif instead of repeated if
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2548/8267] bitbake: uihelper: use elif instead of repeated if
- Date: Sat, 16 Dec 2017 23:23:06 +0000 (UTC)
commit ac2ac312064cde8e2fb8fda956142d80a7b25219
Author: Ross Burton <ross burton intel com>
Date: Fri Sep 16 12:32:27 2016 +0100
bitbake: uihelper: use elif instead of repeated if
(Bitbake rev: a1d6f6425cd9ef9e07344869817517172afd6e27)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/ui/uihelper.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py
index f64fa18..fda7cc2 100644
--- a/bitbake/lib/bb/ui/uihelper.py
+++ b/bitbake/lib/bb/ui/uihelper.py
@@ -35,25 +35,25 @@ class BBUIHelper:
self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task), 'starttime'
: time.time() }
self.running_pids.append(event.pid)
self.needUpdate = True
- if isinstance(event, bb.build.TaskSucceeded):
+ elif isinstance(event, bb.build.TaskSucceeded):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
self.needUpdate = True
- if isinstance(event, bb.build.TaskFailedSilent):
+ elif isinstance(event, bb.build.TaskFailedSilent):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
# Don't add to the failed tasks list since this is e.g. a setscene task failure
self.needUpdate = True
- if isinstance(event, bb.build.TaskFailed):
+ elif isinstance(event, bb.build.TaskFailed):
del self.running_tasks[event.pid]
self.running_pids.remove(event.pid)
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
self.needUpdate = True
- if isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event,
bb.runqueue.sceneQueueTaskStarted):
+ elif isinstance(event, bb.runqueue.runQueueTaskStarted) or isinstance(event,
bb.runqueue.sceneQueueTaskStarted):
self.tasknumber_current = event.stats.completed + event.stats.active + event.stats.failed + 1
self.tasknumber_total = event.stats.total
self.needUpdate = True
- if isinstance(event, bb.build.TaskProgress):
+ elif isinstance(event, bb.build.TaskProgress):
if event.pid > 0:
self.running_tasks[event.pid]['progress'] = event.progress
self.running_tasks[event.pid]['rate'] = event.rate
@@ -62,4 +62,3 @@ class BBUIHelper:
def getTasks(self):
self.needUpdate = False
return (self.running_tasks, self.failed_tasks)
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]