]> git.baikalelectronics.ru Git - uboot.git/commit
patman: Allow running a tool and returning the full result
authorSimon Glass <sjg@chromium.org>
Mon, 10 Jan 2022 03:13:40 +0000 (20:13 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 25 Jan 2022 19:36:10 +0000 (12:36 -0700)
commitc3d1b458c16bde974424ccd6cc74bf095e465b12
tree2a0b7371997c15d63c6f9d9db57f7c3deaa81d02
parent9f01539558d9d1b1f357f3153c3dbac42524fb4f
patman: Allow running a tool and returning the full result

Add a new function which returns the entire result from running a tool,
not just stdout. Update Run() to use this and to return stdout on error,
if stderr is empty, since some unfortunate tools write their error
output to stdout rather than stderr.

Move building of the PATH to a separate function.

Make the exception catching more specific, to catch just ValueError, since
broad exceptions are a pain to debug.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/tools.py