[Python-checkins] cpython (2.7): explicitly close file object (#21128)

benjamin.peterson python-checkins at python.org
Fri Apr 4 20:00:09 CEST 2014


http://hg.python.org/cpython/rev/d7a37a1f2ca9
changeset:   90144:d7a37a1f2ca9
branch:      2.7
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Apr 04 13:56:44 2014 -0400
summary:
  explicitly close file object (#21128)

files:
  Lib/test/test_httpservers.py |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -335,6 +335,7 @@
             response = self.request(self.tempdir_name + '/')
             self.check_status_and_reason(response, 404)
             os.chmod(self.tempdir, 0755)
+        f.close()    
 
     def test_head(self):
         response = self.request(

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list