summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-03-15 20:28:27 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-03-15 20:28:27 (GMT)
commit3270d11d8aee447e6cbd5388d677b4a23879e80e (patch)
tree499e00044c11b4d79ed1a9236ebc9ea8b18fefa1
parent9635013a8fb68c044ea2cae2ec344b3940c188b2 (diff)
parent73277fe0ebd07b470e43804c24282a4947a63341 (diff)
downloadcpython-3270d11d8aee447e6cbd5388d677b4a23879e80e.zip
cpython-3270d11d8aee447e6cbd5388d677b4a23879e80e.tar.gz
cpython-3270d11d8aee447e6cbd5388d677b4a23879e80e.tar.bz2
port from 3.2 - Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199
-rw-r--r--Lib/urllib/response.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py
index b43e575..1cf1d1a 100644
--- a/Lib/urllib/response.py
+++ b/Lib/urllib/response.py
@@ -64,11 +64,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 9bc74d1..a392395 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@ Core and Builtins
Library
-------
+- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
+
- Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.