Reformat the exception message by going through a list.
This commit is contained in:
parent
5df2e614e6
commit
d9bfeac330
|
@ -35,7 +35,9 @@ class CompilerTest(unittest.TestCase):
|
|||
try:
|
||||
compiler.compile(buf, basename, "exec")
|
||||
except Exception, e:
|
||||
e.args[0] += "[in file %s]" % basename
|
||||
args = list(e.args)
|
||||
args[0] += "[in file %s]" % basename
|
||||
e.args = tuple(args)
|
||||
raise
|
||||
|
||||
def testNewClassSyntax(self):
|
||||
|
|
Loading…
Reference in New Issue