diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-09-10 14:20:47 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:36 +0000 |
commit | 136a631b2ee048133093aa5be98c04af6a6f3d9c (patch) | |
tree | ea0486b733977d1a2dd539f6342ca41977067c8e /bitbake/lib | |
parent | 311c9f5042136077e234871c058a965ad4fbc9fc (diff) | |
download | poky-136a631b2ee048133093aa5be98c04af6a6f3d9c.tar.gz |
Restore FuncFailed argument compatibility
(Bitbake rev: c07cc08f7fd503ac3013ccc43c79198c4c3b7b29)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/build.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index f602e0c0ab..afb1aa7b30 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -42,15 +42,21 @@ __builtins__['bb'] = bb | |||
42 | __builtins__['os'] = os | 42 | __builtins__['os'] = os |
43 | 43 | ||
44 | class FuncFailed(Exception): | 44 | class FuncFailed(Exception): |
45 | def __init__(self, name, metadata, logfile = None): | 45 | def __init__(self, name, logfile = None): |
46 | self.name = name | ||
47 | self.metadata = metadata | ||
48 | self.logfile = logfile | 46 | self.logfile = logfile |
47 | if logfile is None: | ||
48 | self.name = None | ||
49 | self.message = name | ||
50 | else: | ||
51 | self.name = name | ||
52 | self.message = "Function '%s' failed" % name | ||
49 | 53 | ||
50 | def __str__(self): | 54 | def __str__(self): |
51 | msg = "Function '%s' failed" % self.name | ||
52 | if self.logfile and os.path.exists(self.logfile): | 55 | if self.logfile and os.path.exists(self.logfile): |
53 | msg += " (see %s for further information)" % self.logfile | 56 | msg = "%s (see %s for further information)" % \ |
57 | (self.message, self.logfile) | ||
58 | else: | ||
59 | msg = self.message | ||
54 | return msg | 60 | return msg |
55 | 61 | ||
56 | class TaskBase(event.Event): | 62 | class TaskBase(event.Event): |