From patchwork Wed Jun 20 14:12:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 03/14] fetch2: Only cache data if fn is set, its pointless caching it against a None value Date: Wed, 20 Jun 2012 14:12:54 -0000 From: Richard Purdie X-Patchwork-Id: 30287 Message-Id: To: bitbake-devel@lists.openembedded.org Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 067d60c..2eeec3d 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1028,7 +1028,7 @@ class Fetch(object): self.ud = {} fn = d.getVar('FILE', True) - if cache and fn in urldata_cache: + if cache and fn and fn in urldata_cache: self.ud = urldata_cache[fn] for url in urls: @@ -1040,7 +1040,7 @@ class Fetch(object): self.ud[url] = None pass - if cache: + if fn and cache: urldata_cache[fn] = self.ud def localpath(self, url):