From b29655c9df6ae36d0ab1395e87f7a1019fcdba88 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 13 Jul 2012 22:35:00 +0200 Subject: [PATCH] Return if nothing found --- couchpotato/core/providers/torrent/torrentleech/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/providers/torrent/torrentleech/main.py b/couchpotato/core/providers/torrent/torrentleech/main.py index e106a5a6..c174a3d4 100644 --- a/couchpotato/core/providers/torrent/torrentleech/main.py +++ b/couchpotato/core/providers/torrent/torrentleech/main.py @@ -52,6 +52,9 @@ class TorrentLeech(TorrentProvider): try: result_table = html.find('table', attrs = {'id' : 'torrenttable'}) + if not result_table: + return results + entries = result_table.find_all('tr') for result in entries[1:]: