commit | ad61bc8d9bb3839341ee99b2befc6760c44179d4 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sat Feb 23 15:11:18 2008 +0000 |
committer | Georg Brandl <georg@python.org> | Sat Feb 23 15:11:18 2008 +0000 |
tree | 1bd20fb6edd43434908162a4a4966bc61ed33f3d | |
parent | 7e251e83d5b488904212f91bace1322d12475803 [diff] |
#2067: file.__exit__() now calls subclasses' close() method.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index eb05cda..932b7dc 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c
@@ -1660,9 +1660,9 @@ } static PyObject * -file_exit(PyFileObject *f, PyObject *args) +file_exit(PyObject *f, PyObject *args) { - PyObject *ret = file_close(f); + PyObject *ret = PyObject_CallMethod(f, "close", NULL); if (!ret) /* If error occurred, pass through */ return NULL;