summaryrefslogtreecommitdiff
path: root/Modules/_io/textio.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-06-09 09:15:42 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2014-06-09 09:15:42 +0300
commit85e4235c0e702b180f3f50b0124fd40c2f460be0 (patch)
treeaeab6bfae28ee6212e222b60f4ed7319aff12037 /Modules/_io/textio.c
parent9f488512a8f95684efe60a0fa6422389fbcd2ef6 (diff)
parent8a8f7f983099f172d1f7c25d4fd99f5c0eb14072 (diff)
downloadcpython-git-85e4235c0e702b180f3f50b0124fd40c2f460be0.tar.gz
Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r--Modules/_io/textio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 24c7b45725..eac5e82b84 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2620,6 +2620,7 @@ textiowrapper_close(textio *self, PyObject *args)
}
else {
PyObject *val2;
+ PyErr_NormalizeException(&exc, &val, &tb);
Py_DECREF(exc);
Py_XDECREF(tb);
PyErr_Fetch(&exc, &val2, &tb);