From 7d71f6641fcb660de0f003e2c028b464d7116ca1 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sat, 26 Jan 2019 09:19:22 +0000 Subject: python: Make iterator handling Python 3 compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many functions that used to return lists (e.g., dict.items()) now return iterators and their iterator counterparts (e.g., dict.iteritems()) have been removed. Switch calls to the Python 2.7 iterator methods to use the Python 3 equivalent and add explicit list conversions where necessary. Change-Id: I0c18114955af8f4932d81fb689a0adb939dafaba Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/15992 Reviewed-by: Juha Jäykkä Reviewed-by: Jason Lowe-Power --- src/python/m5/util/dot_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/python/m5/util/dot_writer.py') diff --git a/src/python/m5/util/dot_writer.py b/src/python/m5/util/dot_writer.py index 7155f1163..f368faacb 100644 --- a/src/python/m5/util/dot_writer.py +++ b/src/python/m5/util/dot_writer.py @@ -67,7 +67,7 @@ except: pydot = False def simnode_children(simNode): - for child in simNode._children.itervalues(): + for child in simNode._children.values(): if isNullPointer(child): continue if isSimObjectVector(child): -- cgit v1.2.3