From cfb43dc930adbbf59879abf8f3f0297caa94a050 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 11 Feb 2009 22:15:45 +0100 Subject: fix crash in manual scan (and other screens) since config speedups --- lib/python/Components/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/python/Components/config.py') diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 3b61909f..c999f2aa 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -178,14 +178,14 @@ class choicesList(object): # XXX: we might want a better name for this def __list__(self): if self.type == choicesList.LIST_TYPE_LIST: - ret = [isinstance(x, tuple) and x[0] or x for x in self.choices] + ret = [not isinstance(x, tuple) and x or x[0] for x in self.choices] else: ret = self.choices.keys() return ret or [""] def __iter__(self): if self.type == choicesList.LIST_TYPE_LIST: - ret = [isinstance(x, tuple) and x[0] or x for x in self.choices] + ret = [not isinstance(x, tuple) and x or x[0] for x in self.choices] else: ret = self.choices return iter(ret or [""]) @@ -232,7 +232,7 @@ class choicesList(object): # XXX: we might want a better name for this class descriptionList(choicesList): # XXX: we might want a better name for this def __list__(self): if self.type == choicesList.LIST_TYPE_LIST: - ret = [isinstance(x, tuple) and x[1] or x for x in self.choices] + ret = [not isinstance(x, tuple) and x or x[1] for x in self.choices] else: ret = self.choices.values() return ret or [""] -- cgit v1.2.3