[issue10219] BufferedReader.read1 does not check for closed file
Amaury Forgeot d'Arc
report at bugs.python.org
Thu Oct 28 13:43:18 CEST 2010
New submission from Amaury Forgeot d'Arc <amauryfa at gmail.com>:
The following snippet should raise ValueError (twice :-)
f = open('foo', 'rb')
print(f.read1(1)) # OK
f.close()
print(f.read1(5)) # expected ValueError("I/O operation on closed file")
print(f.peek()) # expected ValueError("I/O operation on closed file")
The _pyio implementation of BufferedReader.read() has the same issue.
----------
messages: 119771
nosy: amaury.forgeotdarc, pitrou
priority: normal
severity: normal
status: open
title: BufferedReader.read1 does not check for closed file
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10219>
_______________________________________
More information about the Python-bugs-list
mailing list