summaryrefslogtreecommitdiff
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-14 09:25:58 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:50 +0000
commit3d51fd2b7d5a0838053db1df3f1e0234ee306411 (patch)
tree21969fbbf8b7ebdbb06735ff640573498d79e1e9 /bitbake/lib
parentea91b1dd878a5c726ee5118b98c4987fa0a994e7 (diff)
downloadopenembedded-core-3d51fd2b7d5a0838053db1df3f1e0234ee306411.tar.gz
openembedded-core-3d51fd2b7d5a0838053db1df3f1e0234ee306411.tar.bz2
openembedded-core-3d51fd2b7d5a0838053db1df3f1e0234ee306411.tar.xz
openembedded-core-3d51fd2b7d5a0838053db1df3f1e0234ee306411.zip
build: ensure LogTee has a valid name property
(Bitbake rev: 0ebb46e25261cfc85aaef2790cba7c1ec057c306) 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.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 3138fbc16..f511caeb9 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -104,26 +104,24 @@ class TaskInvalid(TaskBase):
class LogTee(object):
- def __init__(self, logger, *files):
- self.files = files
+ def __init__(self, logger, outfile):
+ self.outfile = outfile
self.logger = logger
+ self.name = self.outfile.name
def write(self, string):
self.logger.plain(string)
- for f in self.files:
- f.write(string)
+ self.outfile.write(string)
def __enter__(self):
- for f in self.files:
- f.__enter__()
+ self.outfile.__enter__()
return self
def __exit__(self, *excinfo):
- for f in self.files:
- f.__exit__(*excinfo)
+ self.outfile.__exit__(*excinfo)
def __repr__(self):
- return '<LogTee {0}>'.format(', '.join(repr(f.name) for f in self.files))
+ return '<LogTee {0}>'.format(self.name)
def exec_func(func, d, dirs = None, logfile = NULL):