mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
fix TextIOWrapper.read() when the buffer is not readable #5628
This commit is contained in:
parent
d2ee64d9dd
commit
a1b49013f4
4 changed files with 15 additions and 0 deletions
|
@ -1696,6 +1696,7 @@ class TextIOWrapper(TextIOBase):
|
|||
return cookie
|
||||
|
||||
def read(self, n=None):
|
||||
self._checkReadable()
|
||||
if n is None:
|
||||
n = -1
|
||||
decoder = self._decoder or self._get_decoder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue