summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2007-06-05 19:28:15 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2007-06-05 19:28:15 (GMT)
commitfc41f199bab37eb3ae0a7ce2994e0638b75cbded (patch)
tree1bf6678999e9c84fd6f0002f210fa554fe1d13d8
parent60111e09a915be77762c7af5448ea34a61de4577 (diff)
downloadcpython-fc41f199bab37eb3ae0a7ce2994e0638b75cbded.zip
cpython-fc41f199bab37eb3ae0a7ce2994e0638b75cbded.tar.gz
cpython-fc41f199bab37eb3ae0a7ce2994e0638b75cbded.tar.bz2
Fix for Windows: close a temporary file before trying to delete it.
-rw-r--r--Lib/test/test_multibytecodec.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index dd933f3..bee762f 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -143,6 +143,8 @@ class Test_StreamReader(unittest.TestCase):
f = codecs.open(TESTFN, encoding='cp949')
self.assertRaises(UnicodeDecodeError, f.read, 2)
finally:
+ try: f.close()
+ except: pass
os.unlink(TESTFN)
class Test_StreamWriter(unittest.TestCase):