diff options
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 3138fbc166..f511caeb95 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -104,26 +104,24 @@ class TaskInvalid(TaskBase): | |||
104 | 104 | ||
105 | 105 | ||
106 | class LogTee(object): | 106 | class LogTee(object): |
107 | def __init__(self, logger, *files): | 107 | def __init__(self, logger, outfile): |
108 | self.files = files | 108 | self.outfile = outfile |
109 | self.logger = logger | 109 | self.logger = logger |
110 | self.name = self.outfile.name | ||
110 | 111 | ||
111 | def write(self, string): | 112 | def write(self, string): |
112 | self.logger.plain(string) | 113 | self.logger.plain(string) |
113 | for f in self.files: | 114 | self.outfile.write(string) |
114 | f.write(string) | ||
115 | 115 | ||
116 | def __enter__(self): | 116 | def __enter__(self): |
117 | for f in self.files: | 117 | self.outfile.__enter__() |
118 | f.__enter__() | ||
119 | return self | 118 | return self |
120 | 119 | ||
121 | def __exit__(self, *excinfo): | 120 | def __exit__(self, *excinfo): |
122 | for f in self.files: | 121 | self.outfile.__exit__(*excinfo) |
123 | f.__exit__(*excinfo) | ||
124 | 122 | ||
125 | def __repr__(self): | 123 | def __repr__(self): |
126 | return '<LogTee {0}>'.format(', '.join(repr(f.name) for f in self.files)) | 124 | return '<LogTee {0}>'.format(self.name) |
127 | 125 | ||
128 | 126 | ||
129 | def exec_func(func, d, dirs = None, logfile = NULL): | 127 | def exec_func(func, d, dirs = None, logfile = NULL): |