]> granicus.if.org Git - python/commitdiff
Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes...
authorSenthil Kumaran <senthil@uthcode.com>
Thu, 15 Mar 2012 20:24:40 +0000 (13:24 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Thu, 15 Mar 2012 20:24:40 +0000 (13:24 -0700)
Lib/urllib.py
Misc/NEWS

index a73c5d7ba518ccbcd771ad82f39edb37bb1f0cd9..33641a5700125f7f251210dc917b48f31adb618e 100644 (file)
@@ -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."""
index 3b162bc679df751dfb5600ed009ee177a7181028..376d8d31eb4c56dba8e39b9007ee61d00d37e1c8 100644 (file)
--- 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