]> granicus.if.org Git - python/commitdiff
closes Issue #11199: Fix the with urllib which hangs on particular ftp urls.
authorSenthil Kumaran <senthil@uthcode.com>
Thu, 15 Mar 2012 20:26:12 +0000 (13:26 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Thu, 15 Mar 2012 20:26:12 +0000 (13:26 -0700)
Lib/urllib/response.py
Misc/NEWS

index 8c6dcca5aa1a781275b6f024e7315d74f9811b08..ffaa5fa6fc18a0ffbfa10f4a5f034dcbf263907d 100644 (file)
@@ -61,11 +61,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 1b4e09fceaea6f2332b3b1422f61807f2e7b5fcb..65b22e6f191c3e9c4bde11039ae53e2c4903f50e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
+
 - Issue #14062: Header objects now correctly respect the 'linesep' setting
   when processed by BytesParser (which smtplib.SMTP.send_message uses).