From: ghost Date: Wed, 11 Feb 2009 21:15:45 +0000 (+0100) Subject: fix crash in manual scan (and other screens) since config speedups X-Git-Tag: 2.6.0~447 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/cfb43dc930adbbf59879abf8f3f0297caa94a050?ds=sidebyside fix crash in manual scan (and other screens) since config speedups --- 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 [""]