From 4c59211bd5b136880bb3b5c6aef033e2b62c1019 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Thu, 15 Mar 2012 13:24:40 -0700 Subject: [PATCH] Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199 --- Lib/urllib.py | 2 +- Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index a73c5d7ba51..33641a57001 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 3b162bc679d..376d8d31eb4 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