From 136a631b2ee048133093aa5be98c04af6a6f3d9c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 10 Sep 2010 14:20:47 -0700 Subject: Restore FuncFailed argument compatibility (Bitbake rev: c07cc08f7fd503ac3013ccc43c79198c4c3b7b29) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index f602e0c0a..afb1aa7b3 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -42,15 +42,21 @@ __builtins__['bb'] = bb __builtins__['os'] = os class FuncFailed(Exception): - def __init__(self, name, metadata, logfile = None): - self.name = name - self.metadata = metadata + def __init__(self, name, logfile = None): self.logfile = logfile + if logfile is None: + self.name = None + self.message = name + else: + self.name = name + self.message = "Function '%s' failed" % name def __str__(self): - msg = "Function '%s' failed" % self.name if self.logfile and os.path.exists(self.logfile): - msg += " (see %s for further information)" % self.logfile + msg = "%s (see %s for further information)" % \ + (self.message, self.logfile) + else: + msg = self.message return msg class TaskBase(event.Event): -- cgit v1.2.3