From patchwork Tue Nov 23 18:03:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1558715 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=gf/u5L9S; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HzBrt31zXz9ssD for ; Wed, 24 Nov 2021 05:05:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB77C83754; Tue, 23 Nov 2021 19:04:58 +0100 (CET) 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="gf/u5L9S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8A933836C9; Tue, 23 Nov 2021 19:04:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (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 9139B83605 for ; Tue, 23 Nov 2021 19:04:21 +0100 (CET) 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-oi1-x22f.google.com with SMTP id bf8so46172262oib.6 for ; Tue, 23 Nov 2021 10:04:21 -0800 (PST) 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=UYT8hrOx5gasgui7QUs1vfLnUbpcqmUSNEW/QTcj8uU=; b=gf/u5L9SljdiiVqI7uXdO9Xif2jBemjbMqKa+lptGCHIrDMD30Xou864/54+fsPwA+ qz9mZ2jkZwc+19r1zcpAMLiUsUtBaeh0chtBl7VJcJZKtglVjDly+48qmqSmptKV+rdi 0xcH+kX/7zMj8LLbVGo9A5ZzfZF4fEHdiQ034= 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=UYT8hrOx5gasgui7QUs1vfLnUbpcqmUSNEW/QTcj8uU=; b=WO6+7K0rt+GqVp6Im+/wleXgFP7e3aYBiS2dLHRv3CSchC2OTe+YxtWu9LsEdcZHtW aqtht4074ppDwUH7bzFTTVZt/4Gwcw+0wInvD+/dPPA3EYsHfPP7jOcAkXfJeyganuce B0eMFx2AIz76Jxd6BjrmwNCRoMEfYvCHNOD/yaj/LFE4j2Vj/o0ScN2RDQsd2Y/ls4Mo X8qkl0GNfJRDH6lWg6khXZ3gDDLk4MAqblShRZSnMH+63RTXdNAcVyit1SGyEadOzN8x GImrWLd3h1ziRIYGAwt1MxZEvPRi9L89m6+O2meFMPu3Z4evBR7Hu5e1UEThXMiOU6B0 EcqQ== X-Gm-Message-State: AOAM5329sTzzCDSzE9RMpAU//CQPDURCkEBPgZdz8rWkQ8f+EhdrQkJ8 p/d/vbvqbG7pKZ3Qm7mwPcgMm9oDdKMwWQ== X-Google-Smtp-Source: ABdhPJwcVYEcN1RKd9X9wZtQ32PAQHsOBsBBDc15arJ6dMsJi0Mi8/rQjouImtDl3p31jjjuk75r3g== X-Received: by 2002:aca:a88f:: with SMTP id r137mr4216061oie.85.1637690659988; Tue, 23 Nov 2021 10:04:19 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c8sm2357514otk.40.2021.11.23.10.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 10:04:19 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 08/17] binman: Drop the underscore in _ReadEntries() Date: Tue, 23 Nov 2021 11:03:45 -0700 Message-Id: <20211123180354.615946-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211123180354.615946-1-sjg@chromium.org> References: <20211123180354.615946-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 This function can be overridden so should not have an underscore. Drop it. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/etype/blob_phase.py | 2 +- tools/binman/etype/cbfs.py | 4 ++-- tools/binman/etype/files.py | 2 +- tools/binman/etype/section.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/binman/etype/blob_phase.py b/tools/binman/etype/blob_phase.py index 54ca54c50c1..ed25e467a13 100644 --- a/tools/binman/etype/blob_phase.py +++ b/tools/binman/etype/blob_phase.py @@ -48,4 +48,4 @@ class Entry_blob_phase(Entry_section): subnode = state.AddSubnode(self._node, name) # Read entries again, now that we have some - self._ReadEntries() + self.ReadEntries() diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index 44db7b9bb20..0a858b8b849 100644 --- a/tools/binman/etype/cbfs.py +++ b/tools/binman/etype/cbfs.py @@ -171,7 +171,7 @@ class Entry_cbfs(Entry): self._cbfs_arg = fdt_util.GetString(node, 'cbfs-arch', 'x86') self.align_default = None self._cbfs_entries = OrderedDict() - self._ReadSubnodes() + self.ReadEntries() self.reader = None def ObtainContents(self, skip=None): @@ -204,7 +204,7 @@ class Entry_cbfs(Entry): self.SetContents(data) return True - def _ReadSubnodes(self): + def ReadEntries(self): """Read the subnodes to find out what should go in this CBFS""" for node in self._node.subnodes: entry = Entry.Create(self, node) diff --git a/tools/binman/etype/files.py b/tools/binman/etype/files.py index 9b04a496a85..927d0f071df 100644 --- a/tools/binman/etype/files.py +++ b/tools/binman/etype/files.py @@ -64,4 +64,4 @@ class Entry_files(Entry_section): state.AddInt(subnode, 'align', self._files_align) # Read entries again, now that we have some - self._ReadEntries() + self.ReadEntries() diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index e2949fc9163..281a228cd0e 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -85,9 +85,9 @@ class Entry_section(Entry): if filename: self._filename = filename - self._ReadEntries() + self.ReadEntries() - def _ReadEntries(self): + def ReadEntries(self): for node in self._node.subnodes: if node.name.startswith('hash') or node.name.startswith('signature'): continue @@ -741,5 +741,5 @@ class Entry_section(Entry): missing: List of missing properties / entry args, each a string """ if not self._ignore_missing: - entry.Raise('Missing required properties/entry args: %s' % - (', '.join(missing))) + missing = ', '.join(missing) + entry.Raise(f'Missing required properties/entry args: {missing}')