summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/binman/control.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index ce25eb5485..20186ee198 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -131,10 +131,13 @@ def Binman(options, args):
if options.image:
skip = []
+ new_images = OrderedDict()
for name, image in images.items():
- if name not in options.image:
- del images[name]
+ if name in options.image:
+ new_images[name] = image
+ else:
skip.append(name)
+ images = new_images
if skip and options.verbosity >= 2:
print('Skipping images: %s' % ', '.join(skip))