From: Éric Araujo Date: Fri, 5 Nov 2010 23:59:32 +0000 (+0000) Subject: Of course, I forgot one file in r86223. X-Git-Tag: v3.2a4~118 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fd730e0fbfe2b655722d89626075d5b7f2d77e7;p=python Of course, I forgot one file in r86223. --- diff --git a/Lib/distutils/tests/test_install_scripts.py b/Lib/distutils/tests/test_install_scripts.py index b7eb625ac5..08360d297b 100644 --- a/Lib/distutils/tests/test_install_scripts.py +++ b/Lib/distutils/tests/test_install_scripts.py @@ -42,8 +42,10 @@ class InstallScriptsTestCase(support.TempdirManager, 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"