diff options
Diffstat (limited to 'Lib/distutils/tests/test_build_scripts.py')
-rw-r--r-- | Lib/distutils/tests/test_build_scripts.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_build_scripts.py b/Lib/distutils/tests/test_build_scripts.py index b1d2d07..85b0400 100644 --- a/Lib/distutils/tests/test_build_scripts.py +++ b/Lib/distutils/tests/test_build_scripts.py @@ -71,8 +71,10 @@ class BuildScriptsTestCase(support.TempdirManager, def write_script(self, dir, name, text): f = open(os.path.join(dir, name), "w") - f.write(text) - f.close() + try: + f.write(text) + finally: + f.close() def test_version_int(self): source = self.mkdtemp() |