]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dtoc: Change dst to self in debug message
authorManorit Chawdhry <m-chawdhry@ti.com>
Fri, 29 Dec 2023 10:46:25 +0000 (16:16 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 4 Jan 2024 21:48:00 +0000 (16:48 -0500)
Fix the error message to not use dst and use self as it is copying the
properties to self.

While using templating if there are no subnodes defined, we end up in
this situation where "dst" isn't defined and it tries to print the error
message and fails.

'UnboundLocalError: local variable 'dst' referenced before assignment'

Fixes: 55e1278d5eca ("dtoc: Allow inserting a list of nodes into another")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/dtoc/fdt.py

index 5963925146a5df3fadbf29e33f6d5e995b5ff300..991a36b987965f0b336233072d4ad8c8bdde6a20 100644 (file)
@@ -782,7 +782,7 @@ class Node:
             for node in parent.subnodes.__reversed__():
                 dst = self.copy_node(node)
 
-            tout.debug(f'merge props from {parent.path} to {dst.path}')
+            tout.debug(f'merge props from {parent.path} to {self.path}')
             self.merge_props(parent, False)