commit | a1b49013f477e83bd1652f651f35c2e4eea54b67 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Tue Mar 31 23:11:32 2009 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Tue Mar 31 23:11:32 2009 +0000 |
tree | e56aaae216ffdb72108a7131de3f2dd38ddc8244 | |
parent | d2ee64d9dd62942488a2f7fff18a21b87da7f7a9 [diff] [blame] |
fix TextIOWrapper.read() when the buffer is not readable #5628
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 654a69c..334c2b7 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py
@@ -1696,6 +1696,7 @@ return cookie def read(self, n=None): + self._checkReadable() if n is None: n = -1 decoder = self._decoder or self._get_decoder()