python: Make exception handling Python 3 safe

Change-Id: I9c2cdfad20deb1ddfa224320cf93f2105d126652
Reviewed-on: https://gem5-review.googlesource.com/c/15980
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
Andreas Sandberg
2019-01-25 11:32:25 +00:00
parent 6ba4545b1f
commit fa21127a64
13 changed files with 177 additions and 182 deletions

View File

@@ -35,7 +35,7 @@ class CodeImporter(object):
def add_module(self, filename, abspath, modpath, code):
if modpath in self.modules:
raise AttributeError, "%s already found in importer" % modpath
raise AttributeError("%s already found in importer" % modpath)
self.modules[modpath] = (filename, abspath, code)