From: Guido van Rossum Date: Wed, 21 Sep 1994 11:36:19 +0000 (+0000) Subject: Fix bug if tmpcache is None X-Git-Tag: v1.1~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa59e838132ab11e1d60fe7e05c9032378c2aa7b;p=thirdparty%2FPython%2Fcpython.git Fix bug if tmpcache is None --- diff --git a/Lib/urllib.py b/Lib/urllib.py index a4a891fc4d52..651e37fc18ff 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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)