From 205ad61313eef001d1e6d8afe338242dd1fac984 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 16 Jan 2012 17:31:43 -0500 Subject: only finish error if one occurred --- Python/ast.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v0.12