summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2007-06-05 19:28:15 +0000
committerHye-Shik Chang <hyeshik@gmail.com>2007-06-05 19:28:15 +0000
commitde83c3759d29f08d761d66928b26f00ee63a6e90 (patch)
treef67a15518dc9bf65bff6b670dde943e710179886
parentda96e479ed930ca56d7007cb218da7b4192c0ae5 (diff)
downloadcpython-de83c3759d29f08d761d66928b26f00ee63a6e90.tar.gz
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 052f1681dd..ff88dbabf5 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -17,6 +17,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):