mirror of
https://github.com/python/cpython.git
synced 2025-09-14 04:37:29 +00:00
Fix the urllib closing issue which hangs on particular ftp urls/ftp servers. closes issue11199
This commit is contained in:
parent
f1acd0ab38
commit
4c59211bd5
2 changed files with 3 additions and 1 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue