From: ghost Date: Wed, 11 Feb 2009 14:21:36 +0000 (+0100) Subject: Merge branch 'master' of git.opendreambox.org:/git/enigma2 X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=99f33df4a530c7aa6de98f6e7a64c6d2c626c756;hp=5e6f814d005a01caa437a532e61f4b338617ff67 Merge branch 'master' of git.opendreambox.org:/git/enigma2 --- diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index eaf0718..f72a4c4 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -198,12 +198,15 @@ class choicesList(object): # XXX: we might want a better name for this self.choices[value] = orig def default(self): + choices = self.choices + if not choices: + return "" if self.type is choicesList.LIST_TYPE_LIST: - default = self.choices[0] + default = choices[0] if isinstance(default, tuple): default = default[0] else: - default = self.choices.keys()[0] + default = choices.keys()[0] return default class descriptionList(choicesList): # XXX: we might want a better name for this