data_source_plugin: only keep in cache succesfull retrieval of a data source

This commit is contained in:
Benjamin Dauvergne 2014-01-27 16:39:47 +01:00
parent eb77d6e4ac
commit 9cd8629b6e
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class Data(object):
else:
logger.debug('getting data source %r from url %r finished',
self.data_source.id, self.final_url)
if self.refresh:
if self.refresh and content is not None:
cache.set(self.key, (content, self.now+self.refresh), 3600)
return content