diff options
author | philg314 <110174000+philg314@users.noreply.github.com> | 2022-09-08 11:12:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 11:12:14 (GMT) |
commit | b9634ac776c24bc4d4a57859d884a94cdfe16043 (patch) | |
tree | dd0c2eac6039e155a16e2e26f6352e1f1a1943e1 /Objects | |
parent | 3fedfcf19b86b4e95fd0b0fd089479ffad70e4c6 (diff) | |
download | cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.zip cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.tar.gz cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.tar.bz2 |
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (#96353)
Diffstat (limited to 'Objects')
-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 69f7834..26cdcef 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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); |