News download: Don't fail if the cover url is invalid

This commit is contained in:
Kovid Goyal 2010-01-03 08:02:37 -07:00
parent 5c7db72614
commit 2c5b79f79c

View File

@ -806,7 +806,7 @@ class BasicNewsRecipe(Recipe):
return index return index
def download_cover(self): def _download_cover(self):
self.cover_path = None self.cover_path = None
try: try:
cu = self.get_cover_url() cu = self.get_cover_url()
@ -839,6 +839,14 @@ class BasicNewsRecipe(Recipe):
f.write(mi.cover_data[1]) f.write(mi.cover_data[1])
self.cover_path = cpath self.cover_path = cpath
def download_cover(self):
try:
self._download_cover()
except:
self.log.exception('Failed to download cover')
self.cover_path = None
def default_cover(self, cover_file): def default_cover(self, cover_file):
''' '''