summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-19 17:48:51 -0600
committerSimon Glass <sjg@chromium.org>2023-07-24 09:34:11 -0600
commit573b30377dce76466b24ffd9edad3ac110878deb (patch)
tree05ad7759bb49806964cffbe47c3133c267662adb /tools
parent6378bad3853d632530ff7b17a2a6b8ce6360a843 (diff)
downloadu-boot-573b30377dce76466b24ffd9edad3ac110878deb.tar.gz
u-boot-573b30377dce76466b24ffd9edad3ac110878deb.tar.bz2
u-boot-573b30377dce76466b24ffd9edad3ac110878deb.zip
buildman: Avoid too many returns in do_buildman()
Fix the pylint warning by using a variable instead of lots of 'return' statements. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/buildman/control.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 51dc6fe7ce..44a96cfb7a 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -602,15 +602,16 @@ def do_buildman(options, args, toolchains=None, make_func=None, brds=None,
options.show_bloat, options.list_error_boards, options.show_config,
options.show_environment, options.filter_dtb_warnings,
options.filter_migration_warnings, options.ide)
+ retval = 0
if options.summary:
builder.ShowSummary(commits, board_selected)
else:
fail, warned, excs = builder.BuildBoards(
commits, board_selected, options.keep_outputs, options.verbose)
if excs:
- return 102
+ retval = 102
if fail:
- return 100
+ retval = 100
if warned and not options.ignore_warnings:
- return 101
- return 0
+ retval = 101
+ return retval