[PATCH 3/6] binman: Split node-reading out from constructor in files

Simon Glass sjg at chromium.org
Tue Jul 6 18:36:38 CEST 2021


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 <sjg at chromium.org>
---

 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



More information about the U-Boot mailing list