From 226835e3d0a8db3e5cd22183897cf41a3a092745 Mon Sep 17 00:00:00 2001 From: Dean Gardiner Date: Sun, 29 Sep 2013 23:32:03 +1300 Subject: [PATCH] Added a check to ensure a torrent has been loaded (and found). --- couchpotato/core/downloaders/rtorrent/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/couchpotato/core/downloaders/rtorrent/main.py b/couchpotato/core/downloaders/rtorrent/main.py index 161c671a..d655f5a6 100755 --- a/couchpotato/core/downloaders/rtorrent/main.py +++ b/couchpotato/core/downloaders/rtorrent/main.py @@ -116,6 +116,10 @@ class rTorrent(Downloader): # Send torrent to rTorrent torrent = self.rt.load_torrent(filedata) + if not torrent: + log.error('Unable to find the torrent, did it fail to load?') + return False + # Set label if self.conf('label'): torrent.set_custom(1, self.conf('label'))