mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Fix the compiler package w.r.t. the new metaclass syntax.
(It is still broken w.r.t. the new nonlocal keyword.) Remove a series of debug prints I accidentally left in test_ast.py.
This commit is contained in:
parent
801dd73653
commit
d16e81aabe
7 changed files with 40 additions and 30 deletions
|
@ -50,8 +50,8 @@ class CompilerTest(unittest.TestCase):
|
|||
try:
|
||||
compiler.compile(buf, basename, "exec")
|
||||
except Exception as e:
|
||||
args = list(e.args)
|
||||
args[0] += "[in file %s]" % basename
|
||||
args = list(e.args) or [""]
|
||||
args[0] = "%s [in file %s]" % (args[0], basename)
|
||||
e.args = tuple(args)
|
||||
raise
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue