Added a check to ensure a torrent has been loaded (and found).

This commit is contained in:
Dean Gardiner
2013-09-29 23:32:03 +13:00
parent 48db4c8b8e
commit 226835e3d0

View File

@@ -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'))