From e5e4ab4e055d4febd1306a1eac537f784217fdf7 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 26 Sep 2015 12:58:52 +0100 Subject: [PATCH] [#2236] [Core] Fix filter keyerror removing plugin --- deluge/core/filtermanager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/core/filtermanager.py b/deluge/core/filtermanager.py index 4f1d3e127..912789ee8 100644 --- a/deluge/core/filtermanager.py +++ b/deluge/core/filtermanager.py @@ -177,7 +177,9 @@ class FilterManager(component.Component): for torrent_id in list(torrent_ids): status = self.core.create_torrent_status(torrent_id, torrent_keys, plugin_keys) for field, values in filter_dict.iteritems(): - if (not status[field] in values) and torrent_id in torrent_ids: + if field in status and status[field] in values: + continue + elif torrent_id in torrent_ids: torrent_ids.remove(torrent_id) return torrent_ids