summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urllib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 337015f..82a26b3 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -191,6 +191,8 @@ class URLopener:
while block:
tfp.write(block)
block = fp.read(bs)
+ fp.close()
+ tfp.close()
del fp
del tfp
return result