diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-28 10:28:32 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-28 16:41:46 -0700 |
commit | a69398a2f288fe307c70e1506562ea19eeeef34e (patch) | |
tree | 896ec488f8c8d29c49f875644cbfe9ea6d1106cc /lib/bb/build.py | |
parent | 55fa677c1c3d2ba66ce8ce1f3abc803bf9fb8300 (diff) | |
download | bitbake-a69398a2f288fe307c70e1506562ea19eeeef34e.tar.gz |
build: allow creation of FuncFailed with no function name
This is only for compatibility, and will likely be dropped after this next
bitbake release.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r-- | lib/bb/build.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index 838af02ce..ebf9fa387 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -49,10 +49,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.message = "Function '%s' failed" % name + if name: + self.message = "Function '%s' failed" % name + else: + self.message = "Function failed" def __str__(self): if self.logfile and os.path.exists(self.logfile): |