[Python-checkins] r76643 - in python/branches/py3k: Lib/urllib/request.py

philip.jenvey python-checkins at python.org
Thu Dec 3 03:45:01 CET 2009


Author: philip.jenvey
Date: Thu Dec  3 03:45:01 2009
New Revision: 76643

Log:
Recorded merge of revisions 76642 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76642 | philip.jenvey | 2009-12-02 18:40:13 -0800 (Wed, 02 Dec 2009) | 1 line
  
  actually close files
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/urllib/request.py

Modified: python/branches/py3k/Lib/urllib/request.py
==============================================================================
--- python/branches/py3k/Lib/urllib/request.py	(original)
+++ python/branches/py3k/Lib/urllib/request.py	Thu Dec  3 03:45:01 2009
@@ -1471,7 +1471,7 @@
             try:
                 fp = self.open_local_file(url1)
                 hdrs = fp.info()
-                del fp
+                fp.close()
                 return url2pathname(splithost(url1)[1]), hdrs
             except IOError as msg:
                 pass
@@ -1515,8 +1515,6 @@
                 tfp.close()
         finally:
             fp.close()
-        del fp
-        del tfp
 
         # raise exception if actual size does not match content-length header
         if size >= 0 and read < size:


More information about the Python-checkins mailing list