From b1839fcf758a8d36ba8b082bb5a71f0aec6bbb32 Mon Sep 17 00:00:00 2001 From: Manorit Chawdhry Date: Fri, 29 Dec 2023 16:16:25 +0530 Subject: dtoc: Change dst to self in debug message 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 Reviewed-by: Simon Glass --- tools/dtoc/fdt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py index 5963925..991a36b 100644 --- a/tools/dtoc/fdt.py +++ b/tools/dtoc/fdt.py @@ -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) -- cgit v1.1