From 8a8f7f983099f172d1f7c25d4fd99f5c0eb14072 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 9 Jun 2014 09:13:04 +0300 Subject: Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods. --- Modules/_io/textio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Modules/_io/textio.c') diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index ba5789d3c7..55392b435f 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); -- cgit v1.2.1