]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Avoid too many returns in do_buildman()
authorSimon Glass <sjg@chromium.org>
Wed, 19 Jul 2023 23:48:51 +0000 (17:48 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 24 Jul 2023 15:34:11 +0000 (09:34 -0600)
Fix the pylint warning by using a variable instead of lots of 'return'
statements.

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

index 51dc6fe7ce730aed53c70cfffab262563473a4a2..44a96cfb7a0669d348b460b08036344ac5d39c59 100644 (file)
@@ -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