From 72b452ecf20431726bf36a8142a117b38d36e224 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 17 Jan 2011 23:54:11 +0000 Subject: bitbake/build.py: Allow FuncFailed error to have an optional message Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 74295dd45..722639f3b 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -48,10 +48,13 @@ __builtins__['bb'] = bb __builtins__['os'] = os class FuncFailed(Exception): - def __init__(self, name, logfile = None): + def __init__(self, name = None, logfile = None): self.logfile = logfile self.name = name - self.msg = "Function '%s' failed" % name + if name: + self.msg = "Function '%s' failed" % name + else: + self.msg = "Function failed" def __str__(self): if self.logfile and os.path.exists(self.logfile): -- cgit v1.2.3