summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index e73c598298c..81f61e3e152 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -522,9 +522,13 @@ def _ProcessTemplates(parent):
def _RemoveTemplates(parent):
"""Remove any templates in the binman description
"""
+ del_nodes = []
for node in parent.subnodes:
if node.name.startswith('template'):
- node.Delete()
+ del_nodes.append(node)
+
+ for node in del_nodes:
+ node.Delete()
def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded, indir):
"""Prepare the images to be processed and select the device tree