diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-14 09:25:58 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-14 09:26:37 -0700 |
commit | 0ebb46e25261cfc85aaef2790cba7c1ec057c306 (patch) | |
tree | d630659976e13e8186d58d098b461ad2ef31ed52 | |
parent | 1c8be64732fdf4f3a608c090b3dc92065d6058d6 (diff) | |
download | bitbake-contrib-0ebb46e25261cfc85aaef2790cba7c1ec057c306.tar.gz |
build: ensure LogTee has a valid name property
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r-- | lib/bb/build.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index df7bb7d6e..dcf2bcc27 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -106,26 +106,24 @@ class InvalidTask(Exception): 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): |