From: Hoa Nguyen Date: Wed, 1 Jul 2020 02:07:35 +0000 (-0700) Subject: mem: Fix python3 incompatibility issue in slicc's HTML builder X-Git-Tag: v20.1.0.0~518 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01dd6dd46041b6a6e06afce682d438bf879933a8;p=gem5.git 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 --- 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 += ""