summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-03-15 20:24:40 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-03-15 20:24:40 (GMT)
commit4c59211bd5b136880bb3b5c6aef033e2b62c1019 (patch)
treee4e4c732f45f79b106ebb75fe5957e6ec85e4efe
parentf1acd0ab381b4e50b8f1a3cd0186ff1551c81b06 (diff)
downloadcpython-4c59211bd5b136880bb3b5c6aef033e2b62c1019.zip
cpython-4c59211bd5b136880bb3b5c6aef033e2b62c1019.tar.gz
cpython-4c59211bd5b136880bb3b5c6aef033e2b62c1019.tar.bz2
Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199
-rw-r--r--Lib/urllib.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index a73c5d7..33641a5 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -980,11 +980,11 @@ class addclosehook(addbase):
self.hookargs = hookargs
def close(self):
- addbase.close(self)
if self.closehook:
self.closehook(*self.hookargs)
self.closehook = None
self.hookargs = None
+ addbase.close(self)
class addinfo(addbase):
"""class to add an info() method to an open file."""
diff --git a/Misc/NEWS b/Misc/NEWS
index 3b162bc6..376d8d3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,8 @@ Core and Builtins
Library
-------
+- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
+
- Issue #5219: Prevent event handler cascade in IDLE.
- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under