mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)
(cherry picked from commit b9634ac776
)
Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
This commit is contained in:
parent
3ae2be69cc
commit
19b94bc136
3 changed files with 9 additions and 0 deletions
|
@ -1319,6 +1319,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue