Added a check to ensure a torrent has been loaded (and found).
This commit is contained in:
1 parent
48db4c8b8e
commit
226835e3d0
1 file changed
+4
@@ -116,6 +116,10 @@ class rTorrent(Downloader):
|
|||||||
# Send torrent to rTorrent
|
# Send torrent to rTorrent
|
||||||
torrent = self.rt.load_torrent(filedata)
|
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
|
# Set label
|
||||||
if self.conf('label'):
|
if self.conf('label'):
|
||||||
torrent.set_custom(1, self.conf('label'))
|
torrent.set_custom(1, self.conf('label'))
|
||||||
|
|||||||
Reference in new issue
Block a user