From 0e7f46d6379dbf08183caadfa33b8d0648418d9e Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 18 Nov 2006 10:45:59 +0000 Subject: [PATCH] ignore requests to invalidate non-existing entries --- lib/python/Components/ConfigList.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py index 2de075c6..4dd401f9 100644 --- a/lib/python/Components/ConfigList.py +++ b/lib/python/Components/ConfigList.py @@ -46,9 +46,12 @@ class ConfigList(HTMLComponent, GUIComponent, object): def invalidateCurrent(self): self.l.invalidateEntry(self.l.getCurrentSelectionIndex()) - + def invalidate(self, entry): - self.l.invalidateEntry(self.__list.index(entry)) + # when the entry to invalidate does not exist, just ignore the request. + # this eases up conditional setup screens a lot. + if entry in self.__list: + self.l.invalidateEntry(self.__list.index(entry)) GUI_WIDGET = eListbox -- 2.30.2