From: Shaheed Haque Date: Sat, 28 Dec 2013 11:16:53 +0000 (+0000) Subject: Use correct Python2/3 compatibility iterator. X-Git-Tag: v0.22~14^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55ec5d78267362c2a30d9c04069caf15b3a51e84;p=pyelftools.git Use correct Python2/3 compatibility iterator. --- diff --git a/elftools/dwarf/die.py b/elftools/dwarf/die.py index 7cdefb5..91c0d0b 100644 --- a/elftools/dwarf/die.py +++ b/elftools/dwarf/die.py @@ -9,7 +9,7 @@ from collections import namedtuple import os -from ..common.py3compat import OrderedDict, bytes2str +from ..common.py3compat import OrderedDict, bytes2str, iteritems from ..common.utils import struct_parse, preserve_stream_pos @@ -143,7 +143,7 @@ class DIE(object): def __repr__(self): s = 'DIE %s, size=%s, has_chidren=%s\n' % ( self.tag, self.size, self.has_children) - for attrname, attrval in self.attributes.iteritems(): + for attrname, attrval in iteritems(self.attributes): s += ' |%-18s: %s\n' % (attrname, attrval) return s