summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-12-08 19:35:12 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-12-08 19:35:12 (GMT)
commitca173e2a0719c174af0195873b67e59abd4230cf (patch)
tree2895f3b8b8106fa5178f6d7d60fc4e25f02835fb
parent8c54e7819add95f28dd6dc3a4bfcb9ca596b1073 (diff)
downloadcpython-ca173e2a0719c174af0195873b67e59abd4230cf.zip
cpython-ca173e2a0719c174af0195873b67e59abd4230cf.tar.gz
cpython-ca173e2a0719c174af0195873b67e59abd4230cf.tar.bz2
Fix transient refleaks in test_urllib. Thanks to Florent Xicluna.
-rw-r--r--Lib/urllib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 1c31d48..be77e1d 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -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: