[issue7865] io close() swallowing exceptions
Antoine Pitrou
report at bugs.python.org
Wed Apr 28 13:22:21 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
> I'm quite surprised it wasn't already covered by the test suite :S
Probably an oversight. Do you want to add some tests?
> Should a flush on a closed stream fail (at the moment sometimes it
> does, sometimes doesn't) ?
It probably should, yes.
> Why is sometimes ValueError used when I'd rather expect an IOError ?
Because it's not an IO error at all. No I/O occurs. You are just using
the file wrongly (or the wrong file), hence the ValueError.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7865>
_______________________________________
More information about the Python-bugs-list
mailing list