From e5624a4ed30c33440fd2e421aa93bda0476fae5a Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Mon, 6 Dec 2010 21:58:07 -0700 Subject: knotty: use enumerate for task waiting (Bitbake rev: 89ce8df075ac8c9a5478c86405e6e6b60346a51c) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 00be2f844..21160bff5 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -118,10 +118,8 @@ def init(server, eventHandler): activetasks, failedtasks = helper.getTasks() if activetasks: print("Waiting for %s active tasks to finish:" % len(activetasks)) - tasknum = 1 - for task in activetasks: + for tasknum, task in enumerate(activetasks): print("%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task)) - tasknum = tasknum + 1 if isinstance(event, logging.LogRecord): if event.levelno is logging.CRITICAL or event.levelno is logging.ERROR: -- cgit v1.2.3