From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E25B0C433EF for ; Wed, 8 Sep 2021 13:37:09 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3D83261167 for ; Wed, 8 Sep 2021 13:37:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3D83261167 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0E6F683466; Wed, 8 Sep 2021 15:35: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="oHGnt/C7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4CA37833AB; Wed, 8 Sep 2021 15:34:48 +0200 (CEST) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 12DB083350 for ; Wed, 8 Sep 2021 15:34:39 +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-wr1-x434.google.com with SMTP id v10so3360929wrd.4 for ; Wed, 08 Sep 2021 06:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XLUqsm3J9reoLhygIZA0J79zapaH7FstSfvOPaD1BYM=; b=oHGnt/C7CagsAXIMO6JWcRQb6pE0vXWGibn6+P8CI0HUDtzEQ7Hh/hcNY5xKm4ewFq TM/3Rpc/Cz1OFC9YnNd77r3o18zEeRvkEWnKurviEDm4W6GdEL8fLd/I8AH8LJmN4eoX agTvIUIxzNc/VqGALBy9bNQwsfgQkZNoMr2go= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XLUqsm3J9reoLhygIZA0J79zapaH7FstSfvOPaD1BYM=; b=DD2lTa7L3Xjf1/W7XT7TH7cnsmm1XxJ2R7445AbbinW//XAoCKxBdTkEpzQ/HE6GaO P6Wr3w3gc+el/a7QaWyjH0Lthr6NfYdAWzKB7+EEV7Xb6UIPnipoFvYcShJhcOJ5atj3 tKODeh8YftsKEGZXbNeHq34YhJFX5zFyDVDRArvrAB6FuI/5nVsK+oHxY3I0o1l6O+Cn CnLCYe54RPH9Q6atOvn3JA9uQaDuKVnYZJBtfuXc8dlfo67aos5kZNl0xRoMKOb8tegD eAd0NQAMdXsk23kp0yqdrDEyYW095wwxYnAH5j24gioAKr+hZou6J9uBWfiDd9+IyeWO pvFw== X-Gm-Message-State: AOAM531BBNymGIHfQgin1OIWrm64xipYF7ERvxks+uycjN3RdfZX5cAs 2SPUH99crrettA7Z4bHbWhNYZOKuit49SNwY X-Google-Smtp-Source: ABdhPJz7nxiEszlcKyvUtG+9Cx0sb3C/trEvrtSyVORe/4f2HB5WJGs7wiTFjFTVJu+Zu0zgRwZJ0w== X-Received: by 2002:a5d:4ccc:: with SMTP id c12mr4138431wrt.59.1631108078302; Wed, 08 Sep 2021 06:34:38 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:37 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass Subject: [PATCH 15/35] patman: Use a ValueError exception if tools.Run() fails Date: Wed, 8 Sep 2021 07:33:45 -0600 Message-Id: <20210908133405.696481-3-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean The Exception base class is a very vague and could be confusing to the test system. Use the more specific ValueError exception instead. Signed-off-by: Simon Glass --- tools/patman/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/tools.py b/tools/patman/tools.py index 877e37cd8da..23ddb124804 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -348,7 +348,7 @@ def Run(name, *args, **kwargs): result = command.RunPipe([all_args], capture=True, capture_stderr=True, env=env, raise_on_error=False, binary=binary) if result.return_code: - raise Exception("Error %d running '%s': %s" % + raise ValueError("Error %d running '%s': %s" % (result.return_code,' '.join(all_args), result.stderr)) return result.stdout -- 2.33.0.153.gba50c8fa24-goog