diff options
author | Simon Glass <sjg@chromium.org> | 2019-05-15 00:53:41 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-11 01:52:45 +0300 |
commit | 509791542816ce984ac4716827205de49b82b282 (patch) | |
tree | e8356f14089e13bbc8bc1c6d792ca0c6e20a60c6 /tools/binman/elf.py | |
parent | 4a4c5dd43f02f60717ef121aa4bb89a85465ff3c (diff) | |
download | u-boot-509791542816ce984ac4716827205de49b82b282.tar.xz |
binman: Use items() instead of iteritems()
Python 3 requires this, and Python 2 allows it. Convert the code over to
ensure compatibility with Python 3.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf.py')
-rw-r--r-- | tools/binman/elf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/binman/elf.py b/tools/binman/elf.py index 97df8e32c5..828681d76d 100644 --- a/tools/binman/elf.py +++ b/tools/binman/elf.py @@ -59,7 +59,7 @@ def GetSymbols(fname, patterns): flags[1] == 'w') # Sort dict by address - return OrderedDict(sorted(syms.iteritems(), key=lambda x: x[1].address)) + return OrderedDict(sorted(syms.items(), key=lambda x: x[1].address)) def GetSymbolAddress(fname, sym_name): """Get a value of a symbol from an ELF file @@ -98,7 +98,7 @@ def LookupAndWriteSymbols(elf_fname, entry, section): base = syms.get('__image_copy_start') if not base: return - for name, sym in syms.iteritems(): + for name, sym in syms.items(): if name.startswith('_binman'): msg = ("Section '%s': Symbol '%s'\n in entry '%s'" % (section.GetPath(), name, entry.GetPath())) |