diff options
author | Georg Brandl <georg@python.org> | 2008-02-23 15:11:18 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-02-23 15:11:18 (GMT) |
commit | ad61bc8d9bb3839341ee99b2befc6760c44179d4 (patch) | |
tree | 1bd20fb6edd43434908162a4a4966bc61ed33f3d /Objects | |
parent | 7e251e83d5b488904212f91bace1322d12475803 (diff) | |
download | cpython-ad61bc8d9bb3839341ee99b2befc6760c44179d4.zip cpython-ad61bc8d9bb3839341ee99b2befc6760c44179d4.tar.gz cpython-ad61bc8d9bb3839341ee99b2befc6760c44179d4.tar.bz2 |
#2067: file.__exit__() now calls subclasses' close() method.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/fileobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ file_self(PyFileObject *f) } 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; |