[issue7865] io close() swallowing exceptions
Antoine Pitrou
report at bugs.python.org
Tue Apr 27 21:55:45 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
I just tried the patch. One problem is that you are supposed to be able to call close() several times without having it fail:
>>> f = open("LICENSE")
>>> f.close()
>>> f.close()
>>> f = io.open("LICENSE")
>>> f.close()
>>> f.close()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: I/O operation on closed file.
This means your patch should be a little smarter.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7865>
_______________________________________
More information about the Python-bugs-list
mailing list