summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-09-10 14:20:47 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:36 +0000
commit136a631b2ee048133093aa5be98c04af6a6f3d9c (patch)
treeea0486b733977d1a2dd539f6342ca41977067c8e /bitbake/lib/bb
parent311c9f5042136077e234871c058a965ad4fbc9fc (diff)
downloadopenembedded-core-136a631b2ee048133093aa5be98c04af6a6f3d9c.tar.gz
openembedded-core-136a631b2ee048133093aa5be98c04af6a6f3d9c.tar.bz2
openembedded-core-136a631b2ee048133093aa5be98c04af6a6f3d9c.zip
Restore FuncFailed argument compatibility
(Bitbake rev: c07cc08f7fd503ac3013ccc43c79198c4c3b7b29) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/build.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index f602e0c0ab..afb1aa7b30 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):