Kaydet (Commit) 00723e03 authored tarafından Victor Stinner's avatar Victor Stinner

Fix ast_for_atom()

Clear PyObject_Str() exception if it failed, ast_error() should not be called
with an exception set.
üst 99bb14bf
......@@ -2040,6 +2040,7 @@ ast_for_atom(struct compiling *c, const node *n)
PyOS_snprintf(buf, sizeof(buf), "(%s) %s", errtype, s);
Py_DECREF(errstr);
} else {
PyErr_Clear();
PyOS_snprintf(buf, sizeof(buf), "(%s) unknown error", errtype);
}
ast_error(c, n, buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment