gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (#96353)

This commit is contained in:
philg314 2022-09-08 13:12:14 +02:00 committed by GitHub
parent 3fedfcf19b
commit b9634ac776
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View file

@ -1351,6 +1351,8 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
PyErr_Format(PyExc_AttributeError,
"'%.50s' object has no attribute '%U'",
tp->tp_name, name);
set_attribute_error_context(obj, name);
}
done:
Py_XDECREF(descr);