diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index a26f61eb42..2ae8185601 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -904,14 +904,14 @@ 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: if url not in self.ud: self.ud[url] = FetchData(url, d) - if cache: + if fn and cache: urldata_cache[fn] = self.ud def localpath(self, url):