summaryrefslogtreecommitdiffstats
path: root/Modules/parsermodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r--Modules/parsermodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index e5b4e55..1ffa896 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -581,10 +581,11 @@ parser_do_parse(PyObject *args, PyObject *kw, char *argspec, int type)
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);
}