Fix bug breaking the cache (fixes #5586)

This commit is contained in:
Benjamin Dauvergne 2014-09-25 14:01:25 +02:00
parent 3ec77339bd
commit a6419a4722
1 changed files with 1 additions and 2 deletions

View File

@ -222,7 +222,6 @@ class Data(object):
def update_content(self):
content = None
if self.url.startswith('http'):
stream, error = self.resolve_http_url()
elif self.url.startswith('file:'):
@ -247,7 +246,7 @@ class Data(object):
if settings.TEMPLATE_DEBUG:
return msg
return None
if self.refresh and content is not None:
if self.refresh and data is not None:
cache.set(self.key, (data, self.now+self.refresh), 86400*12)
log.debug('finished')
if self.key in self.UPDATE_THREADS: