summaryrefslogtreecommitdiff
path: root/configs/common/cpu2000.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2019-01-26 10:57:44 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2019-02-26 10:28:00 +0000
commit32bbddf2362421021b016d995f5e27b2bceea3a2 (patch)
tree500971374192fb73f41ee41a4e419a61bfca03b9 /configs/common/cpu2000.py
parentc38a6523ab4df2b57337be0b2446bd9d30be94b4 (diff)
downloadgem5-32bbddf2362421021b016d995f5e27b2bceea3a2.tar.xz
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 <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/16002 Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'configs/common/cpu2000.py')
-rw-r--r--configs/common/cpu2000.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/configs/common/cpu2000.py b/configs/common/cpu2000.py
index da87507d9..8143e45de 100644
--- a/configs/common/cpu2000.py
+++ b/configs/common/cpu2000.py
@@ -93,13 +93,13 @@ class Benchmark(object):
try:
func = getattr(self.__class__, input_set)
except AttributeError:
- raise AttributeError, \
- 'The benchmark %s does not have the %s input set' % \
- (self.name, input_set)
+ raise AttributeError(
+ 'The benchmark %s does not have the %s input set' % \
+ (self.name, input_set))
executable = joinpath(spec_dist, 'binaries', isa, os, self.binary)
if not isfile(executable):
- raise AttributeError, '%s not found' % executable
+ raise AttributeError('%s not found' % executable)
self.executable = executable
# root of tree for input & output data files
@@ -113,7 +113,7 @@ class Benchmark(object):
self.input_set = input_set
if not isdir(inputs_dir):
- raise AttributeError, '%s not found' % inputs_dir
+ raise AttributeError('%s not found' % inputs_dir)
self.inputs_dir = [ inputs_dir ]
if isdir(all_dir):
@@ -670,7 +670,7 @@ class vortex(Benchmark):
elif (isa == 'sparc' or isa == 'sparc32'):
self.endian = 'bendian'
else:
- raise AttributeError, "unknown ISA %s" % isa
+ raise AttributeError("unknown ISA %s" % isa)
super(vortex, self).__init__(isa, os, input_set)