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 954B0C001DC for ; Wed, 19 Jul 2023 23:58:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A92CD867D9; Thu, 20 Jul 2023 01:52:31 +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="JWYOGfGd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 66A9086795; Thu, 20 Jul 2023 01:50:38 +0200 (CEST) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 D31528606E for ; Thu, 20 Jul 2023 01:50:32 +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-io1-xd34.google.com with SMTP id ca18e2360f4ac-7866189cff1so9585639f.0 for ; Wed, 19 Jul 2023 16:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810631; x=1690415431; 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=evORRT6/3vzJV21Kh6gYL1ztQoNwt2wJehbggTt+MTk=; b=JWYOGfGdTtcSn/JlWr+IMKYKYpvop8aN0+5GNvM1distFdpRHWcrbU2CoZoy1xCM68 xo3JMI61Ap9RsE37ixxLEdUNTujdrj1/owvUIvOeoF91nez6x6LQt/QN1xecKKxO9tP6 QrEAQy95F7ZVxT2lcbEns1ZDeIH6Ex4qyQS8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810631; x=1690415431; 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=evORRT6/3vzJV21Kh6gYL1ztQoNwt2wJehbggTt+MTk=; b=ceRKm54bfT7aqpQENaacojlFb4hsVMPLlCSyCPPAc50f9qETLEONm/HWRnZCOWR+Np M/Jp3C7msp/65B2CF/QZbii4G/hzT8VCm6U+zjus2W58H8Cd1ojbDtFAbjEWfx5quS5Z ZckAfIo6IEsjY+XxmXojMlJ7r3h8fzq4BzcvjhjNxoB5/tgzrgVWqllWS1ucLq0C9oh3 TCeCt1BTgGmPSWDXGLlDY8FXI5lWvLQ3g7eF5P9R/yHeEG02inIN/yUOoBn9bYvJ+t60 DAKXCy7Evdb8AUdm23IFM63uEb3j1NaM/xK9JGfoE/H1rfMAoiq4NMqSiAv+bHZ6AkhR RCSw== X-Gm-Message-State: ABy/qLYFLa8nUcyYmD8OXdeZdpji/vUaaSKpYKkYLkZ8a1jjMDocgLgz mYRx/xurzmo6lP5NFjg4RQz4RBTVeObBJYzP8do= X-Google-Smtp-Source: APBJJlHVEyR9ATK2SBELhitEFjjZH80lLObqAkYRMuV35e/KvXdS9DZ52/o+jtMTFeoVpqmPwwIqyg== X-Received: by 2002:a5e:8818:0:b0:786:7389:51d7 with SMTP id l24-20020a5e8818000000b00786738951d7mr3965775ioj.5.1689810631482; Wed, 19 Jul 2023 16:50:31 -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 ed16-20020a056638291000b0042bb1779c18sm1551779jab.151.2023.07.19.16.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 43/83] buildman: Avoid too many returns in do_buildman() Date: Wed, 19 Jul 2023 17:48:51 -0600 Message-ID: <20230719234953.796101-44-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230719234953.796101-1-sjg@chromium.org> References: <20230719234953.796101-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.487.g6d72f3e995-goog