From 5737885dfd866ef85eaec52e7b2538c1c3f4bfd0 Mon Sep 17 00:00:00 2001 From: Toilal Date: Wed, 11 Mar 2015 20:15:06 +0100 Subject: [PATCH] Make deluge downloader works when label plugin is disabled --- couchpotato/core/downloaders/deluge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/downloaders/deluge.py b/couchpotato/core/downloaders/deluge.py index 3bcbfb6..c116de2 100644 --- a/couchpotato/core/downloaders/deluge.py +++ b/couchpotato/core/downloaders/deluge.py @@ -236,7 +236,7 @@ class DelugeRPC(object): if not torrent_id: torrent_id = self._check_torrent(True, torrent) - if torrent_id and options['label']: + if torrent_id and options['label'] and hasattr(self.client, 'label'): self.client.label.set_torrent(torrent_id, options['label']).get() except Exception as err: log.error('Failed to add torrent magnet %s: %s %s', (torrent, err, traceback.format_exc())) @@ -254,7 +254,7 @@ class DelugeRPC(object): if not torrent_id: torrent_id = self._check_torrent(False, torrent) - if torrent_id and options['label']: + if torrent_id and options['label'] and hasattr(self.client, 'label'): self.client.label.set_torrent(torrent_id, options['label']).get() except Exception as err: log.error('Failed to add torrent file %s: %s %s', (filename, err, traceback.format_exc()))