summaryrefslogtreecommitdiffstats
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py1
1 files changed, 1 insertions, 0 deletions
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 @@ 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()