From 39f6ec5f63ffe1c5fa5d2cc8f61b9585ab0688d9 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 10 Jun 2010 15:09:55 -0700 Subject: cooker: Kill __getitem__ usage on exception objects (python 3 prep) (Bitbake rev: 1239df8b82ddcd607630da5a888ca83051a22fa8) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 2b38065de..8f79c4f72 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -708,8 +708,8 @@ class BBCooker: failures = 0 try: retval = rq.execute_runqueue() - except runqueue.TaskFailure, fnids: - for fnid in fnids: + except runqueue.TaskFailure as exc: + for fnid in exc.args: bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) failures = failures + 1 retval = False @@ -744,8 +744,8 @@ class BBCooker: failures = 0 try: retval = rq.execute_runqueue() - except runqueue.TaskFailure, fnids: - for fnid in fnids: + except runqueue.TaskFailure as exc: + for fnid in exc.args: bb.msg.error(bb.msg.domain.Build, "'%s' failed" % taskdata.fn_index[fnid]) failures = failures + 1 retval = False -- cgit v1.2.3