summaryrefslogtreecommitdiffstats
path: root/Lib/io.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/io.py')
-rw-r--r--Lib/io.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/io.py b/Lib/io.py
index e427fe6..01c31a9 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -365,6 +365,7 @@ class IOBase(metaclass=abc.ABCMeta):
def __enter__(self) -> "IOBase": # That's a forward reference
"""Context management protocol. Returns self."""
+ self._checkClosed()
return self
def __exit__(self, *args) -> None: