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=-20.2 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, URIBL_BLOCKED,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 AD13AC07E96 for ; Tue, 6 Jul 2021 16:37:42 +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 29F5E61C47 for ; Tue, 6 Jul 2021 16:37:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29F5E61C47 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9949782DA9; Tue, 6 Jul 2021 18:37:13 +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="NxiXVdLy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0DE6C82D58; Tue, 6 Jul 2021 18:37:06 +0200 (CEST) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (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 0431F82D8F for ; Tue, 6 Jul 2021 18:37:00 +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-oi1-x22e.google.com with SMTP id h9so25228680oih.4 for ; Tue, 06 Jul 2021 09:36:59 -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=RHzKReScc0RiPvb733wl6El2wLQ6PwqfuvhPDtBQd30=; b=NxiXVdLy2InXGVxZKt6D5cGqYRfYTQ28DMYAJtK6JWusdKkW9hMkC2K88ADmYAwKSd yiNYcijs3qNtUzsfMUJSS/OSvpv5jBa9S97v7d0auwFkL1Al+DQgaUnUJf2DFJx7OMfm dzoJCko1i4IGAW/r0p4coZgbVzKzoqST4zgKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RHzKReScc0RiPvb733wl6El2wLQ6PwqfuvhPDtBQd30=; b=QgZaB+FBpXgM++YxdB929SDlZtRop9Ixeu97MLncTlPabSHsVMmj1KY6J5dStzSOC1 UzSVq2PYYFTOf8oas6RPtduqiHVYskEyd4Sx10yj4DOhvwyhT+3JUMN1YJTHjLis2m85 lsioMr+zAlY9/WrPZvC3lZcqiOssc1wAbvQ07KEbm8kHhYHn/+K9Rj2qMQAUuB/hOsAc OmzcPwCiYSfUm1LBnR/ULtuZsRL75na1hhHbJ7eh8oUH0+2K3DiJk2We0KipWjdX/vIK 4sgqzMM3lvsDzfF+6irt+bQIImg4ZsjFAcCKfGE8+qd0Sz0WJhWSRMr5HSOV5v0k6Nn0 ObOQ== X-Gm-Message-State: AOAM531Y4z1z5g0mkmJJQDLJnRLiVxnXELHuNULeWE9nfHJKfQ8JKEbI ns1PMHUGl1S/5uhYsOsSFVz7xzDbXCft/k7M X-Google-Smtp-Source: ABdhPJzidcErjPme5NkiKCKHm72dU3qr/j+pHwwmKQxKttkoTOWCNxJIziq7zhxlm7cPYyRLRt5Jmg== X-Received: by 2002:aca:f507:: with SMTP id t7mr6520140oih.42.1625589417955; Tue, 06 Jul 2021 09:36:57 -0700 (PDT) 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 e74sm3336357ote.14.2021.07.06.09.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 09:36:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Bin Meng Subject: [PATCH 3/6] binman: Split node-reading out from constructor in files Date: Tue, 6 Jul 2021 10:36:38 -0600 Message-Id: <20210706163641.2280401-4-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog In-Reply-To: <20210706163641.2280401-1-sjg@chromium.org> References: <20210706163641.2280401-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 constructor should not read the node information. Move it to the ReadNode() method instead. This allows this etype to be subclassed. Signed-off-by: Simon Glass --- tools/binman/etype/files.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/binman/etype/files.py b/tools/binman/etype/files.py index 5db36abef0b..9b04a496a85 100644 --- a/tools/binman/etype/files.py +++ b/tools/binman/etype/files.py @@ -34,6 +34,9 @@ class Entry_files(Entry_section): from binman import state super().__init__(section, etype, node) + + def ReadNode(self): + super().ReadNode() self._pattern = fdt_util.GetString(self._node, 'pattern') if not self._pattern: self.Raise("Missing 'pattern' property") -- 2.32.0.93.g670b81a890-goog