Kaydet (Commit) fa59e838 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix bug if tmpcache is None

üst 798199d8
......@@ -123,8 +123,9 @@ class URLopener:
headers = fp.info()
import tempfile
tfn = tempfile.mktemp()
result = tfn, headers
if self.tempcache is not None:
self.tempcache[url] = result = tfn, headers
self.tempcache[url] = result
tfp = open(tfn, 'w')
bs = 1024*8
block = fp.read(bs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment