Browse Source

fixed key error exception

throws a key error exception when finding 0 movie results from the api call - tried to return error from the repsonse but there will never exists an error, because of the way yts.ag's API works.
pull/7189/head
Sebastian W. Gram 8 years ago
committed by GitHub
parent
commit
b87c3f4e14
  1. 2
      couchpotato/core/media/_base/providers/torrent/yts.py

2
couchpotato/core/media/_base/providers/torrent/yts.py

@ -25,7 +25,7 @@ class Base(TorrentMagnetProvider):
movie_count = tryInt(data['data']['movie_count']) movie_count = tryInt(data['data']['movie_count'])
if movie_count == 0: if movie_count == 0:
log.error('%s returned an error (search or tryInt() failed): %s', (self.getName(), data['error'])) log.error('%s returned an error (search or tryInt() failed): found no results', (self.getName()))
else: else:
movie_results = data['data']['movies'] movie_results = data['data']['movies']

Loading…
Cancel
Save