Commit f3d3e95ce5d26777a6a138635f9bb12ca7ccf6fa
Committed by
Tom Rini
1 parent
86845bf38d
Exists in
v2017.01-smarct4x
and in
25 other branches
test/py: Return output from run_and_log()
It is useful to be able to obtain the output from a command. Return it from this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
test/py/u_boot_utils.py
... | ... | @@ -165,12 +165,13 @@ |
165 | 165 | problems occur. |
166 | 166 | |
167 | 167 | Returns: |
168 | - Nothing. | |
168 | + The output as a string. | |
169 | 169 | """ |
170 | 170 | |
171 | 171 | runner = u_boot_console.log.get_runner(cmd[0], sys.stdout) |
172 | - runner.run(cmd, ignore_errors=ignore_errors) | |
172 | + output = runner.run(cmd, ignore_errors=ignore_errors) | |
173 | 173 | runner.close() |
174 | + return output | |
174 | 175 | |
175 | 176 | ram_base = None |
176 | 177 | def find_ram_base(u_boot_console): |