Fix ast_for_atom()
Clear PyObject_Str() exception if it failed, ast_error() should not be called with an exception set.
This commit is contained in:
parent
99bb14bf0c
commit
00723e0353
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue