From b883ffc474aead68f6086bc924e21675c6bc1993 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 25 May 2009 22:55:42 +0000 Subject: [PATCH] Fix exception when trackers are disabled from the sidebar --- deluge/core/filtermanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/core/filtermanager.py b/deluge/core/filtermanager.py index a6e051136..3287af0c8 100644 --- a/deluge/core/filtermanager.py +++ b/deluge/core/filtermanager.py @@ -196,7 +196,8 @@ class FilterManager(component.Component): value = status[field] items[field][value] = items[field].get(value, 0) + 1 - items["tracker_host"]["Error"] = len(tracker_error_filter(torrent_ids, ("Error",))) + if "tracker_host" in items: + items["tracker_host"]["Error"] = len(tracker_error_filter(torrent_ids, ("Error",))) if "state" in tree_keys and not show_zero_hits: self._hide_state_items(items["state"])