summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-11 18:10:11 -0400
committerTom Rini <trini@konsulko.com>2019-07-11 18:10:11 -0400
commita9758ece08bceb60634145c2126582e5d282bd09 (patch)
treeb391039a3bc2aa8222a14b3e960541296d585878 /tools/binman/control.py
parent68deea2308141c26707da44654b273d7b072ab0d (diff)
parent7ea33579576d2bcd19df76bd8769e7ab3b4a169b (diff)
downloadu-boot-a9758ece08bceb60634145c2126582e5d282bd09.tar.gz
Merge tag 'dm-pull-9jul19-take2' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm
- Sandbox improvements including .dts refactor - Minor tracing and PCI improvements - Various other minor fixes - Conversion of patman, dtoc and binman to support Python 3
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index b32e4e1996..20186ee198 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -5,6 +5,8 @@
# Creates binary images from input files controlled by a description
#
+from __future__ import print_function
+
from collections import OrderedDict
import os
import sys
@@ -129,12 +131,15 @@ def Binman(options, args):
if options.image:
skip = []
- for name, image in images.iteritems():
- if name not in options.image:
- del images[name]
+ new_images = OrderedDict()
+ for name, image in images.items():
+ 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)
+ print('Skipping images: %s' % ', '.join(skip))
state.Prepare(images, dtb)
@@ -170,7 +175,7 @@ def Binman(options, args):
except Exception as e:
if options.map:
fname = image.WriteMap()
- print "Wrote map file '%s' to show errors" % fname
+ print("Wrote map file '%s' to show errors" % fname)
raise
image.SetImagePos()
if options.update_fdt: