[Python-checkins] cpython: only finish error if one occurred

benjamin.peterson python-checkins at python.org
Mon Jan 16 23:31:48 CET 2012


http://hg.python.org/cpython/rev/8241fc821e2b
changeset:   74459:8241fc821e2b
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Jan 16 17:31:43 2012 -0500
summary:
  only finish error if one occurred

files:
  Python/ast.c |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Python/ast.c b/Python/ast.c
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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;
 }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list