diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py index b43e57595b0..1cf1d1aaeda 100644 --- a/Lib/urllib/response.py +++ b/Lib/urllib/response.py @@ -64,11 +64,11 @@ def __init__(self, fp, closehook, *hookargs): 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 9bc74d12057..a39239523b7 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.