From 54f963e5bf4242a6fb0fbd18ca2ed782617102e0 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 14 Apr 2009 22:02:08 +0000 Subject: other places like this just catch IOError --- Lib/_pyio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_pyio.py b/Lib/_pyio.py index b2d17e9..3fd1afe 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() -- cgit v0.12