]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Update fit to move node reading into the ReadNode() method
authorSimon Glass <sjg@chromium.org>
Sun, 6 Mar 2022 03:19:07 +0000 (20:19 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 19 Mar 2022 01:24:25 +0000 (19:24 -0600)
This should not be done in the constructor. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
tools/binman/etype/fit.py

index 9bc25888e86073221115a81eb24097126edd3845..4858ad4dd1bc95f73f4b3f7260df45a899cd8a89 100644 (file)
@@ -168,12 +168,14 @@ class Entry_fit(Entry_section):
         super().__init__(section, etype, node)
         self._fit = None
         self._fit_props = {}
+        self._fdts = None
+        self.mkimage = None
 
+    def ReadNode(self):
+        super().ReadNode()
         for pname, prop in self._node.props.items():
             if pname.startswith('fit,'):
                 self._fit_props[pname] = prop
-
-        self._fdts = None
         self._fit_list_prop = self._fit_props.get('fit,fdt-list')
         if self._fit_list_prop:
             fdts, = self.GetEntryArgsOrProps(
@@ -182,10 +184,6 @@ class Entry_fit(Entry_section):
                 self._fdts = fdts.split()
         self._fit_default_dt = self.GetEntryArgsOrProps([EntryArg('default-dt',
                                                                   str)])[0]
-        self.mkimage = None
-
-    def ReadNode(self):
-        super().ReadNode()
 
     def _get_operation(self, subnode):
         """Get the operation referenced by a subnode