]> granicus.if.org Git - python/commitdiff
Fix for Windows: close a temporary file before trying to delete it.
authorHye-Shik Chang <hyeshik@gmail.com>
Tue, 5 Jun 2007 19:28:15 +0000 (19:28 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Tue, 5 Jun 2007 19:28:15 +0000 (19:28 +0000)
Lib/test/test_multibytecodec.py

index b6557f3d98af5a1fb819ae222180c45377be2998..f2b042cc7cea8b3805c8176f0e9666637cee3bd2 100644 (file)
@@ -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):