| Message ID | 20260103200510.3605009-2-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767470738; bh=gWs+RWYPg9ean7MpbEjVBh2Q0w8n7WplQz7XQ7CCKW0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=spIVkBu/CqEwLb1zupVallUu4RNeOCzVxwTSpUWkwC80lZrRL99IZZ8E82DOagfV8 TMUp7XPoVeW0N9+PLyOmon7bmM77tgAPh6wm8c6e+DdJQgcXC9S8G0GHYJ2m601uzG EtnBnPNLxGNUTlKrZVMGIX3j/QXNkkkSpo5DoKoVMB0433CYZ1yfcN9G/iGhg28UGS LqUeE6EZ3gdbWmTZjeyiEUnn+2tEXe7+C0IAvTpFdoWtXpZ+V7rBm0UgW2/6fHk7bt ED4KomOaXB+4Z0qhwLsDAtA5/Vsro3vT8LmeU1l/lZKDB31Du1Xec+2iwR436XW4Ly JjBBu9EayFO2w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AC47269090 for <u-boot-concept@u-boot.org>; Sat, 3 Jan 2026 13:05:38 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8IFq7GNBezwU for <u-boot-concept@u-boot.org>; Sat, 3 Jan 2026 13:05:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767470738; bh=gWs+RWYPg9ean7MpbEjVBh2Q0w8n7WplQz7XQ7CCKW0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=spIVkBu/CqEwLb1zupVallUu4RNeOCzVxwTSpUWkwC80lZrRL99IZZ8E82DOagfV8 TMUp7XPoVeW0N9+PLyOmon7bmM77tgAPh6wm8c6e+DdJQgcXC9S8G0GHYJ2m601uzG EtnBnPNLxGNUTlKrZVMGIX3j/QXNkkkSpo5DoKoVMB0433CYZ1yfcN9G/iGhg28UGS LqUeE6EZ3gdbWmTZjeyiEUnn+2tEXe7+C0IAvTpFdoWtXpZ+V7rBm0UgW2/6fHk7bt ED4KomOaXB+4Z0qhwLsDAtA5/Vsro3vT8LmeU1l/lZKDB31Du1Xec+2iwR436XW4Ly JjBBu9EayFO2w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9C54E69060 for <u-boot-concept@u-boot.org>; Sat, 3 Jan 2026 13:05:38 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767470735; bh=4xkCyR1byYOOVbf23u9obPtWPeVasOc8S98rAK6XWAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OFx+iothSvb++DmDZ2czqegomgzVpF2jel2gYmMr1Y27jUXUd8VM8AiCSqdBZC1pd T1nvMFvHHhkJFG5+o+ndDGLdOXeMrTWAs7roJRxddQYQAbDOIl3PbpJdoWXXq8NCSh r4ZCeZ/8O0DzZlOn6EQfizUpDGL+Bb4fGiwilt5h9AHYa/VTACdwMrJL0C/Flgbxmg atZmol2Vs+jKP01V2D2ogA5sVmI9lFM8mMLCVftcKLJ7pAscfL7nxQ5AVEGP+JsTZP BNx5dzutN0WOiIUDKdXHtqtrb7Fnhex62ZLc38kB6ecj7ZrhGw/kwPzn2czrrR30kT S5D4zzWp48Ntw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 971ED6908D; Sat, 3 Jan 2026 13:05:35 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id zsagZULhMaUq; Sat, 3 Jan 2026 13:05:35 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767470730; bh=sxbMwWvZHl1Mde2SzeFb1Ay5xHk6wjouchkcrGorf2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WumQUGMUREOW77ffEoDkCnFJOEUb6alIUuiVZ0gkglV2/K+d7bpWQ0yVCs6bYvy8E xicvUq0ObxHG3rfT1oO3IIBPjYL7Mll74sEMKRJgMetHzsrn5U8WcZb8kEtXrPN9YA QWBey4zBLXkqKacseh9c53UOY5Hhp/qrwcy+icP/+CS8JWLDEwJDpP2YZ3ggJlSyi3 HKpKupkLcOWQeEbPf4BtY/git7Q8CUikzNf/b/myXsH6eA8x2PdvMGQpGkvW5N+8GA ILziGJ5KT0tYULFmWTpSlh7Ajn3tbMrj/cTQykH1s4OPRjdnrVKNnGc+sNAemX0PL9 YXWthnO6tFqBQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 89BA768FCC; Sat, 3 Jan 2026 13:05:30 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Sat, 3 Jan 2026 13:04:32 -0700 Message-ID: <20260103200510.3605009-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260103200510.3605009-1-sjg@u-boot.org> References: <20260103200510.3605009-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WOGX4QVTI2TCCJB5BVPF2YCIQYHGOW4T X-Message-ID-Hash: WOGX4QVTI2TCCJB5BVPF2YCIQYHGOW4T X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <simon.glass@canonical.com>, Claude <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 01/29] u_boot_pylib: command: Convert output before raising exception List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/WOGX4QVTI2TCCJB5BVPF2YCIQYHGOW4T/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Malloc debugging and test/py improvements
|
|
Commit Message
Simon Glass
Jan. 3, 2026, 8:04 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> Call to_output() before raising CommandExc so that callers catching the exception get string output rather than bytes. This avoids the need for callers to handle bytes decoding themselves. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- (no changes since v1) tools/u_boot_pylib/command.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/u_boot_pylib/command.py b/tools/u_boot_pylib/command.py index cb7ebf49ce5..6b3f9fe59bf 100644 --- a/tools/u_boot_pylib/command.py +++ b/tools/u_boot_pylib/command.py @@ -136,9 +136,10 @@ def run_pipe(pipe_list, infile=None, outfile=None, capture=False, if result.stdout and oneline: result.output = result.stdout.rstrip(b'\r\n') result.return_code = last_pipe.wait() + result = result.to_output(binary) if raise_on_error and result.return_code: raise CommandExc(f"Error running '{user_pipestr}'", result) - return result.to_output(binary) + return result def output(*cmd, **kwargs):