summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2009-12-03 02:45:01 (GMT)
committerPhilip Jenvey <pjenvey@underboss.org>2009-12-03 02:45:01 (GMT)
commitcb134d7d88baf08b9edcc4bf653be95bb2718bd2 (patch)
tree0367d7634037b6f8394ebe5ef19a04b612b2654d /Lib/urllib
parentb089684ee0216306ad14259f171ffe2f9d42fe89 (diff)
downloadcpython-cb134d7d88baf08b9edcc4bf653be95bb2718bd2.zip
cpython-cb134d7d88baf08b9edcc4bf653be95bb2718bd2.tar.gz
cpython-cb134d7d88baf08b9edcc4bf653be95bb2718bd2.tar.bz2
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 ........
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index d669aec..6c72152 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1471,7 +1471,7 @@ class URLopener:
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 @@ class URLopener:
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: