Permalink
Browse files

Update app/lib/provider/yarr/sources/x264.py

  • Loading branch information...
1 parent ace92a3 commit 9c019d8b17f30343ff8646431562c24d84c2eb5a @stourwalk committed Jan 11, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/lib/provider/yarr/sources/x264.py
@@ -34,7 +34,12 @@ def find(self, movie, quality, type):
url = self.searchUrl % quote_plus(self.toSearchString(movie.name + ' ' + quality))
log.info('Searching: %s' % url)
- data = urllib.urlopen(url)
+
+ try:
+ data = urllib2.urlopen(url, timeout = self.timeout).read()
+ except (IOError, URLError):
+ log.error('Failed to open %s.' % url )
+ return results
try:
tables = SoupStrainer('table')

0 comments on commit 9c019d8

Please sign in to comment.