Fix transient refleaks in test_urllib. Thanks to Florent Xicluna.

This commit is contained in:
Antoine Pitrou 2009-12-08 19:35:12 +00:00
parent 8c54e7819a
commit ca173e2a07
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,8 @@ def urlretrieve(url, filename=None, reporthook=None, data=None):
def urlcleanup():
if _urlopener:
_urlopener.cleanup()
_safemaps.clear()
ftpcache.clear()
# check for SSL
try: