From: Martin v. Löwis <martin@v.loewis.de>
Date: Wed, 1 Mar 2006 23:24:34 +0000 (+0000)
Subject: Reformat the exception message by going through a list.
X-Git-Tag: v2.5a0~413
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9bfeac33047d17ab829653ec8d1e6822a635984;p=python

Reformat the exception message by going through a list.
---

diff --git a/Lib/test/test_compiler.py b/Lib/test/test_compiler.py
index f58e6e5273..6ec71ed38f 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):