diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-17 23:54:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-17 23:54:28 +0000 |
commit | 72b452ecf20431726bf36a8142a117b38d36e224 (patch) | |
tree | 3077a797d0160a0c3d3792d3d01529c0463aa947 /bitbake | |
parent | 4cd1118a090f69a7d050cd69da798af55e2b41b1 (diff) | |
download | openembedded-core-72b452ecf20431726bf36a8142a117b38d36e224.tar.gz openembedded-core-72b452ecf20431726bf36a8142a117b38d36e224.tar.bz2 openembedded-core-72b452ecf20431726bf36a8142a117b38d36e224.zip |
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.py | 7 |
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 __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): |