aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components')
-rwxr-xr-xlib/python/Components/config.py6
1 files changed, 3 insertions, 3 deletions
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 [""]