diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-04-14 22:02:08 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-04-14 22:02:08 +0000 |
commit | 54f963e5bf4242a6fb0fbd18ca2ed782617102e0 (patch) | |
tree | 74c2da3b4e9e17a7d7188817d9b11dd1c828fcbf | |
parent | 55fc9ce7e1db294df9a7affa44eeab1a66acefac (diff) | |
download | cpython-git-54f963e5bf4242a6fb0fbd18ca2ed782617102e0.tar.gz |
other places like this just catch IOError
-rw-r--r-- | Lib/_pyio.py | 2 |
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() |