summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-17 23:54:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-17 23:54:28 +0000
commit72b452ecf20431726bf36a8142a117b38d36e224 (patch)
tree3077a797d0160a0c3d3792d3d01529c0463aa947 /bitbake
parent4cd1118a090f69a7d050cd69da798af55e2b41b1 (diff)
downloadpoky-72b452ecf20431726bf36a8142a117b38d36e224.tar.gz
bitbake/build.py: Allow FuncFailed error to have an optional message
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/build.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 74295dd454..722639f3bb 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -48,10 +48,13 @@ __builtins__['bb'] = bb
48__builtins__['os'] = os 48__builtins__['os'] = os
49 49
50class FuncFailed(Exception): 50class FuncFailed(Exception):
51 def __init__(self, name, logfile = None): 51 def __init__(self, name = None, logfile = None):
52 self.logfile = logfile 52 self.logfile = logfile
53 self.name = name 53 self.name = name
54 self.msg = "Function '%s' failed" % name 54 if name:
55 self.msg = "Function '%s' failed" % name
56 else:
57 self.msg = "Function failed"
55 58
56 def __str__(self): 59 def __str__(self):
57 if self.logfile and os.path.exists(self.logfile): 60 if self.logfile and os.path.exists(self.logfile):