summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJérome Perrin <perrinjerome@gmail.com>2024-01-21 17:25:55 (GMT)
committerGitHub <noreply@github.com>2024-01-21 17:25:55 (GMT)
commit3bd4c3a86cc4739f57ea5d6d580b536a0b87fb3f (patch)
tree0989ef74f065a233caa936699217e8282dc6f94d /Python
parentd2cfb5b258f8355f47fe461479cceb3a476176c6 (diff)
downloadcpython-3bd4c3a86cc4739f57ea5d6d580b536a0b87fb3f.zip
cpython-3bd4c3a86cc4739f57ea5d6d580b536a0b87fb3f.tar.gz
cpython-3bd4c3a86cc4739f57ea5d6d580b536a0b87fb3f.tar.bz2
[3.11] gh-113358 Fix rendering tracebacks with exceptions with a broken __getattr__ : Normalize exception (#114379)
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index d3c0c85..fca8b7a 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1206,6 +1206,7 @@ get_exception_notes(struct exception_print_context *ctx, PyObject *value, PyObje
if (_PyObject_LookupAttr(value, &_Py_ID(__notes__), notes) < 0) {
PyObject *type, *errvalue, *tback;
PyErr_Fetch(&type, &errvalue, &tback);
+ PyErr_NormalizeException(&type, &errvalue, &tback);
note = PyUnicode_FromFormat("Ignored error getting __notes__: %R", errvalue);
Py_XDECREF(type);
Py_XDECREF(errvalue);