mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 01:32:47 +02:00
dtoc: Adjust code for Python 3
Update a few things in this tool so that they support Python 3: - print statements - iteritems() - xrange() Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -449,7 +449,7 @@ class DtbPlatdata(object):
|
||||
self.out(';\n')
|
||||
self.out('};\n')
|
||||
|
||||
for alias, struct_name in self._aliases.iteritems():
|
||||
for alias, struct_name in self._aliases.items():
|
||||
if alias not in sorted(structs):
|
||||
self.out('#define %s%s %s%s\n'% (STRUCT_PREFIX, alias,
|
||||
STRUCT_PREFIX, struct_name))
|
||||
@@ -498,7 +498,7 @@ class DtbPlatdata(object):
|
||||
vals.append(get_value(prop.type, val))
|
||||
|
||||
# Put 8 values per line to avoid very long lines.
|
||||
for i in xrange(0, len(vals), 8):
|
||||
for i in range(0, len(vals), 8):
|
||||
if i:
|
||||
self.buf(',\n\t\t')
|
||||
self.buf(', '.join(vals[i:i + 8]))
|
||||
|
Reference in New Issue
Block a user