From: Hye-Shik Chang Date: Tue, 5 Jun 2007 19:28:15 +0000 (+0000) Subject: Fix for Windows: close a temporary file before trying to delete it. X-Git-Tag: v2.4.5c1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac90ca8c54804c364237ae441a26717c21704530;p=thirdparty%2FPython%2Fcpython.git Fix for Windows: close a temporary file before trying to delete it. --- diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py index 052f1681ddae..ff88dbabf5cf 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):