From 01dd6dd46041b6a6e06afce682d438bf879933a8 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Tue, 30 Jun 2020 19:07:35 -0700 Subject: [PATCH] mem: Fix python3 incompatibility issue in slicc's HTML builder In python3, an iterator does not have the next() method. next(iterator) works in both python2.7+ and python3. Change-Id: Ic1ceb993018a0f37e8d30086a054ffc2e311bb46 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30874 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/slicc/generate/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/slicc/generate/html.py b/src/mem/slicc/generate/html.py index ecb4baa75..c0ed368e7 100644 --- a/src/mem/slicc/generate/html.py +++ b/src/mem/slicc/generate/html.py @@ -62,7 +62,7 @@ def formatShorthand(short): if i + 1 < len(short): # -- Proceed to next char. Yes I know that changing # the loop var is ugly! - i,c = gen.next() + i,c = next(gen) munged_shorthand += "" munged_shorthand += c munged_shorthand += "" -- 2.30.2