From d9bfeac33047d17ab829653ec8d1e6822a635984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 1 Mar 2006 23:24:34 +0000 Subject: [PATCH] Reformat the exception message by going through a list. --- Lib/test/test_compiler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):