From: Senthil Kumaran Date: Thu, 15 Mar 2012 20:26:12 +0000 (-0700) Subject: closes Issue #11199: Fix the with urllib which hangs on particular ftp urls. X-Git-Tag: v3.3.0a2~169^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73277fe0ebd07b470e43804c24282a4947a63341;p=python closes Issue #11199: Fix the with urllib which hangs on particular ftp urls. --- diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py index 8c6dcca5aa..ffaa5fa6fc 100644 --- a/Lib/urllib/response.py +++ b/Lib/urllib/response.py @@ -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.""" diff --git a/Misc/NEWS b/Misc/NEWS index 1b4e09fcea..65b22e6f19 100644 --- 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).