From 901d2d715c907fcb0c14b4dde5516bc85d19fb81 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 9 Apr 2010 13:05:02 -0700 Subject: [PATCH] Fix #1222 do not try to set options on a torrent_id that is no longer in the session --- deluge/plugins/label/label/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/label/label/core.py index 0971db766..1bd52b8c5 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -269,7 +269,7 @@ class Core(CorePluginBase): #apply for torrent_id,label in self.torrent_labels.iteritems(): - if label_id == label: + if label_id == label and torrent_id in self.torrents: self._set_torrent_options(torrent_id , label_id) #auto add