Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4B0F0C001DF for ; Sun, 16 Jul 2023 00:44:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C40A586674; Sun, 16 Jul 2023 02:39:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KKiE0PQT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B1A6D86622; Sun, 16 Jul 2023 02:38:08 +0200 (CEST) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9DE3486281 for ; Sun, 16 Jul 2023 02:37:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3461053677eso7079165ab.0 for ; Sat, 15 Jul 2023 17:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467872; x=1692059872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VMX404g0lIG21VNgXd2stfB3lu5SumadRJ8HmBJM0QI=; b=KKiE0PQT0slKwBmNX4I9ZrrigplwtWDWDu+aZI08TXwKElP25A+OWddCLA+MCmKYek yW3s3bMNN4aherWlYbV7wypi1EZSD9yspZsw81t/iXPjJekRRIkNU6gFAwo3nlvTRKki XSJDuM/Rsy5wpvNgJPIr9ZI7FZ2noqbCPAB8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467872; x=1692059872; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMX404g0lIG21VNgXd2stfB3lu5SumadRJ8HmBJM0QI=; b=HpV53KOEE4tnWMSkXbwbn1fHKLf3EyPczqVpHCSOx9pMEVRISJHMJ95Ar+3409iFe7 5kJNn5wRI5zCs9YHABd9c2qsD3YUCqpt5bv6JuENJNHi0bNnJJCZq2k2Ht4/WpPnvW06 RJiVAqTGgGt+kPQSTCpKFwsTt0jlup8izquOVd5TFRw3udu7nn6vL9yC2MR/jX/oyvwy XHwUGGgx2bV2ffZOnFDryHPNZRg9CBmakTSHKtfyncUEVqZW0Kfyc1Fy0y3KALb/ew9N 9+DFn8aqRsreMWI/gEfc0kGNhEMxlld1kXISSjogqHaJPUvbrPK3RXQlG2tqINaubxi1 YIiA== X-Gm-Message-State: ABy/qLbQbVPJRID9b5+bPHzClhzIL+bKrkhyoDjONvqSNWm92FuKEhOU hIvtSVG3OsU6D59GKko6qbrz08laeQCVmD3R+NA= X-Google-Smtp-Source: APBJJlG53sjw0ViJduILbbJ5onnjjxcPLcPXINcfSDtewnQMddtX/uFru28cTOLWJx2M4xq0M4FccQ== X-Received: by 2002:a92:cccd:0:b0:346:3fc5:93e0 with SMTP id u13-20020a92cccd000000b003463fc593e0mr4540096ilq.2.1689467872214; Sat, 15 Jul 2023 17:37:52 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:37:52 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 41/81] buildman: Avoid too many returns in do_buildman() Date: Sat, 15 Jul 2023 18:36:09 -0600 Message-ID: <20230716003718.231903-42-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Fix the pylint warning by using a variable instead of lots of 'return' statements. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/control.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 51dc6fe7ce73..44a96cfb7a06 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 -- 2.41.0.455.g037347b96a-goog