summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):