From d2c25b6d28b04dfa5e6c9dc2573dacad4f946563 Mon Sep 17 00:00:00 2001 From: Mika Bostrom Date: Sat, 21 Nov 2009 23:51:18 +0200 Subject: [PATCH] Fix simple error in filter code Other parts test that the object is valid before calling .set_active(); follow convention to eliminate needless errors --- pyfpdb/Filters.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 4ee2bdf1..88576a13 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -312,9 +312,11 @@ class Filters(threading.Thread): self.cbAllLimits.set_active(False) if not self.limits[limit]: if limit.isdigit(): - self.cbFL.set_active(False) + if self.cbFl is not None: + self.cbFl.set_active(False) else: - self.cbNL.set_active(False) + if self.cbNL is not None: + self.cbNL.set_active(False) elif limit == "all": if self.limits[limit]: #for cb in self.cbLimits.values():