[PATCH v2 05/38] patman: Allow running a tool and returning the full result

Simon Glass sjg at chromium.org
Wed Jan 26 16:37:11 CET 2022


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 at chromium.org>
---

(no changes since v1)

 tools/patman/tools.py | 56 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 46 insertions(+), 10 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list