summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-11-05 23:59:32 (GMT)
committerÉric Araujo <merwok@netwok.org>2010-11-05 23:59:32 (GMT)
commit5fd730e0fbfe2b655722d89626075d5b7f2d77e7 (patch)
tree17da5bd7c67e18bca99c26f587739ebfe2f8dd7e
parent89c0478c53f0d702bb00a0dba357ea0958b51489 (diff)
downloadcpython-5fd730e0fbfe2b655722d89626075d5b7f2d77e7.zip
cpython-5fd730e0fbfe2b655722d89626075d5b7f2d77e7.tar.gz
cpython-5fd730e0fbfe2b655722d89626075d5b7f2d77e7.tar.bz2
Of course, I forgot one file in r86223.
-rw-r--r--Lib/distutils/tests/test_install_scripts.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_install_scripts.py b/Lib/distutils/tests/test_install_scripts.py
index b7eb625..08360d2 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"