Author: guido.van.rossum
Date: Tue Jul 10 14:00:45 2007
New Revision: 56235
Modified:
python/branches/py3k-struni/Lib/io.py
Log:
Set closed flag *after* calling flush().
Modified: python/branches/py3k-struni/Lib/io.py
==============================================================================
--- python/branches/py3k-struni/Lib/io.py (original)
+++ python/branches/py3k-struni/Lib/io.py Tue Jul 10 14:00:45 2007
@@ -227,8 +227,10 @@
'closed' property (see below) to test.
"""
if not self.__closed:
- self.__closed = True
- self.flush()
+ try:
+ self.flush()
+ finally:
+ self.__closed = True
def __del__(self) -> None:
"""Destructor. Calls close()."""
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins