summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/_pyio.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index b2d17e9809..3fd1afedde 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -1438,7 +1438,7 @@ class TextIOWrapper(TextIOBase):
def close(self):
try:
self.flush()
- except:
+ except IOError:
pass # If flush() fails, just give up
self.buffer.close()