From 32bbddf2362421021b016d995f5e27b2bceea3a2 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sat, 26 Jan 2019 10:57:44 +0000 Subject: configs: Fix Python 3 iterator and exec compatibility issues Python 2.7 used to return lists for operations such as map and range, this has changed in Python 3. To make the configs Python 3 compliant, add explicit conversions from iterators to lists where needed, replace xrange with range, and fix changes to exec syntax. This change doesn't fix import paths since that might require us to restructure the configs slightly. Change-Id: Idcea8482b286779fc98b4e144ca8f54069c08024 Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/16002 Reviewed-by: Gabe Black --- configs/common/cores/arm/HPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configs/common/cores') diff --git a/configs/common/cores/arm/HPI.py b/configs/common/cores/arm/HPI.py index 2efb7dfec..d105790e3 100644 --- a/configs/common/cores/arm/HPI.py +++ b/configs/common/cores/arm/HPI.py @@ -177,7 +177,7 @@ def let(bindings, expr): defns = [] # Then apply them to the produced new env - for i in xrange(0, len(bindings)): + for i in range(0, len(bindings)): name, binding_expr = bindings[i] defns.append(binding_expr(new_env)) -- cgit v1.2.3