]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
other places like this just catch IOError
authorBenjamin Peterson <benjamin@python.org>
Tue, 14 Apr 2009 22:02:08 +0000 (22:02 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 14 Apr 2009 22:02:08 +0000 (22:02 +0000)
Lib/_pyio.py

index b2d17e9809a0a2159ada6d14c508062e221e87f5..3fd1afedde7ba1033dcc688005aee041119cdf9c 100644 (file)
@@ -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()