handle read URL data failures

This commit is contained in:
Christophe Benz 2010-08-09 20:29:07 +02:00
commit 46f4de696e
2 changed files with 16 additions and 2 deletions

View file

@ -75,7 +75,7 @@ class YoutubeBackend(BaseBackend, ICapVideo):
video = self.browser.get_video(YoutubeVideo.id2url(video.id), video)
if 'thumbnail' in fields:
with self.browser:
video.thumbnail.data = self.browser.openurl(video.thumbnail.url).read()
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
return video