]> git.ipfire.org Git - thirdparty/Python/cpython.git/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 052f1681ddae647eaa325bcb5a933b0e23e28933..ff88dbabf5cfc9248cdec12a5a366a34c6b206ac 100644 (file)
@@ -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):