diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-16 22:31:43 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-16 22:31:43 (GMT) |
commit | 205ad61313eef001d1e6d8afe338242dd1fac984 (patch) | |
tree | 7ff5f0bd84a6d8bbff949935f99124e529d970b4 /Python | |
parent | c0beabc2a57f6599a411d3b5579dd6c64ffd47b7 (diff) | |
download | cpython-205ad61313eef001d1e6d8afe338242dd1fac984.zip cpython-205ad61313eef001d1e6d8afe338242dd1fac984.tar.gz cpython-205ad61313eef001d1e6d8afe338242dd1fac984.tar.bz2 |
only finish error if one occurred
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c index 66b85b5..ef161b6 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -835,7 +835,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename, PyTuple_SET_ITEM(c.c_normalize_args, 1, NULL); Py_DECREF(c.c_normalize_args); } - ast_error_finish(filename); + if (!res) + ast_error_finish(filename); return res; } |