diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py index f58e6e5273f..6ec71ed38fc 100644 --- a/Lib/test/test_compiler.py +++ b/Lib/test/test_compiler.py @@ -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):