[Python-checkins] r86226 - python/branches/py3k/Lib/distutils/tests/test_install_scripts.py

eric.araujo python-checkins at python.org
Sat Nov 6 00:59:33 CET 2010


Author: eric.araujo
Date: Sat Nov  6 00:59:32 2010
New Revision: 86226

Log:
Of course, I forgot one file in r86223.


Modified:
   python/branches/py3k/Lib/distutils/tests/test_install_scripts.py

Modified: python/branches/py3k/Lib/distutils/tests/test_install_scripts.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_install_scripts.py	(original)
+++ python/branches/py3k/Lib/distutils/tests/test_install_scripts.py	Sat Nov  6 00:59:32 2010
@@ -42,8 +42,10 @@
         def write_script(name, text):
             expected.append(name)
             f = open(os.path.join(source, name), "w")
-            f.write(text)
-            f.close()
+            try:
+                f.write(text)
+            finally:
+                f.close()
 
         write_script("script1.py", ("#! /usr/bin/env python2.3\n"
                                     "# bogus script w/ Python sh-bang\n"


More information about the Python-checkins mailing list