]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/build.py: Allow FuncFailed error to have an optional message
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Jan 2011 23:54:11 +0000 (23:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Jan 2011 23:54:28 +0000 (23:54 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/build.py

index 74295dd4546500237c1c77319e528435b7653422..722639f3bb086960ae112487ab7b622b71fcfd9d 100644 (file)
@@ -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):