diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-09 06:13:04 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-09 06:13:04 (GMT) |
commit | 8a8f7f983099f172d1f7c25d4fd99f5c0eb14072 (patch) | |
tree | ece2ee26d3edfee06c27e325f7aff80cf9c2adfb /Modules | |
parent | b1f59cecc97000396604a3852804932512598938 (diff) | |
download | cpython-8a8f7f983099f172d1f7c25d4fd99f5c0eb14072.zip cpython-8a8f7f983099f172d1f7c25d4fd99f5c0eb14072.tar.gz cpython-8a8f7f983099f172d1f7c25d4fd99f5c0eb14072.tar.bz2 |
Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/bufferedio.c | 1 | ||||
-rw-r--r-- | Modules/_io/textio.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index 7494646..d0e92e5 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -549,6 +549,7 @@ buffered_close(buffered *self, PyObject *args) } else { PyObject *val2; + PyErr_NormalizeException(&exc, &val, &tb); Py_DECREF(exc); Py_XDECREF(tb); PyErr_Fetch(&exc, &val2, &tb); diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index ba5789d..55392b4 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -2614,6 +2614,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); |