diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-10-08 22:27:00 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-10-08 22:27:00 +0000 |
| commit | 295fb0f22061cb6c1c014d866ea79c453527a867 (patch) | |
| tree | c50e5825ab7f0b575868acde5cb76fc4586cb931 /lib/python | |
| parent | 01bac3e45e35628a40839816efda2a11492ac658 (diff) | |
| download | enigma2-295fb0f22061cb6c1c014d866ea79c453527a867.tar.gz enigma2-295fb0f22061cb6c1c014d866ea79c453527a867.zip | |
don't create selection comments for now, check ConfigSubsection contents for valid classes, fix default not overwriting non-defaults
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/config.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 07186157..75035a78 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -158,7 +158,7 @@ class ConfigSelection(ConfigElement): self.changed() def tostring(self, val): - return (val, ','.join(self.choices)) + return val def getValue(self): return self._value @@ -697,6 +697,7 @@ class ConfigSubsection(object): def __setattr__(self, name, value): if name == "saved_value": return self.setSavedValue(value) + assert isinstance(value, ConfigSubsection) or isinstance(value, ConfigElement) or isinstance(value, ConfigSubList) or isinstance(value, ConfigSubDict), "ConfigSubsections can only store ConfigSubsections, ConfigSubLists, ConfigSubDicts or ConfigElements" self.content.items[name] = value if name in self.content.stored_values: #print "ok, now we have a new item,", name, "and have the following value for it:", self.content.stored_values[name] @@ -711,6 +712,9 @@ class ConfigSubsection(object): for (key, val) in self.content.items.items(): if val.saved_value is not None: res[key] = val.saved_value + elif key in res: + del res[key] + return res def setSavedValue(self, values): |
