[PATCH 27/58] buildman: Adjust show_toolchain_prefix() to not return
Simon Glass
sjg at chromium.org
Sun Jul 2 16:25:52 CEST 2023
This function does not need to return. Simplify the code by exiting
immediately.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/buildman/control.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index db8377e9ac42..d520e01334ce 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -121,10 +121,9 @@ def show_toolchain_prefix(brds, toolchains):
for brd in board_selected.values():
tc_set.add(toolchains.Select(brd.arch))
if len(tc_set) != 1:
- return 'Supplied boards must share one toolchain'
+ sys.exit('Supplied boards must share one toolchain')
tchain = tc_set.pop()
print(tchain.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
- return None
def get_allow_missing(opt_allow, opt_no_allow, num_selected, has_branch):
"""Figure out whether to allow external blobs
@@ -545,9 +544,7 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None,
return brds
if options.print_prefix:
- err = show_toolchain_prefix(brds, toolchains)
- if err:
- sys.exit(col.build(col.RED, err))
+ show_toolchain_prefix(brds, toolchains)
return 0
selected, why_selected, board_warnings = determine_boards(
--
2.41.0.255.g8b1d071c50-goog
More information about the U-Boot
mailing list