Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 70638:3ffd8dea77bf
only clear the parser error if it's set (closes #12264)
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 04 Jun 2011 22:06:42 -0500 |
| parents | 6e9dc970ac0e |
| children | 9faa9270457e |
line wrap: on
line diff
--- a/Modules/parsermodule.c Fri Jun 03 17:50:59 2011 -0500 +++ b/Modules/parsermodule.c Sat Jun 04 22:06:42 2011 -0500 @@ -581,10 +581,11 @@ if (res) ((PyST_Object *)res)->st_flags.cf_flags = flags & PyCF_MASK; } - else + else { PyParser_SetError(&err); + PyParser_ClearError(&err); + } } - PyParser_ClearError(&err); return (res); }
