From: Benjamin Peterson Date: Tue, 14 Apr 2009 22:02:08 +0000 (+0000) Subject: other places like this just catch IOError X-Git-Tag: v3.1b1~280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54f963e5bf4242a6fb0fbd18ca2ed782617102e0;p=thirdparty%2FPython%2Fcpython.git other places like this just catch IOError --- diff --git a/Lib/_pyio.py b/Lib/_pyio.py index b2d17e9809a0..3fd1afedde7b 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()