diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-09-08 11:46:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 11:46:53 (GMT) |
commit | 19b94bc136b188d3da5ab8d02b93eb55a48bc641 (patch) | |
tree | 405329a8fe5e10102ffb69f481c2e0e98a4c0f14 /Objects/object.c | |
parent | 3ae2be69cc7d99979e00d2ea9217496b8529bdd6 (diff) | |
download | cpython-19b94bc136b188d3da5ab8d02b93eb55a48bc641.zip cpython-19b94bc136b188d3da5ab8d02b93eb55a48bc641.tar.gz cpython-19b94bc136b188d3da5ab8d02b93eb55a48bc641.tar.bz2 |
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)
(cherry picked from commit b9634ac776c24bc4d4a57859d884a94cdfe16043)
Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index 47c352e..6d80d6d 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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); |