[Python-checkins] r71505 - python/branches/py3k/Parser/asdl.py
georg.brandl
python-checkins at python.org
Sun Apr 12 13:34:16 CEST 2009
Author: georg.brandl
Date: Sun Apr 12 13:34:13 2009
New Revision: 71505
Log:
#2725: Fix missing local, and handle errors without tracebacks.
Modified:
python/branches/py3k/Parser/asdl.py
Modified: python/branches/py3k/Parser/asdl.py
==============================================================================
--- python/branches/py3k/Parser/asdl.py (original)
+++ python/branches/py3k/Parser/asdl.py Sun Apr 12 13:34:13 2009
@@ -405,7 +405,8 @@
try:
return parser.parse(tokens)
except ASDLSyntaxError:
- output(sys.exc_info()[1])
+ err = sys.exc_info()[1]
+ output(str(err))
lines = buf.split("\n")
output(lines[err.lineno - 1]) # lines starts at 0, files at 1
@@ -422,6 +423,8 @@
for file in files:
output(file)
mod = parse(file)
+ if not mod:
+ break
output("module", mod.name)
output(len(mod.dfns), "definitions")
if not check(mod):
More information about the Python-checkins
mailing list