diff Python/ast.c @ 74459:8241fc821e2b

only finish error if one occurred
author Benjamin Peterson <benjamin@python.org>
date Mon, 16 Jan 2012 17:31:43 -0500
parents 169fbbac2dec
children 953d6ee29464
line wrap: on
line diff
--- a/Python/ast.c	Mon Jan 16 17:29:05 2012 -0500
+++ b/Python/ast.c	Mon Jan 16 17:31:43 2012 -0500
@@ -835,7 +835,8 @@
         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;
 }