master subgroups that have subgroups

This commit is contained in:
gwen 2013-01-11 09:46:41 +01:00
parent f9d6f62a70
commit 189053ad03
2 changed files with 12 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -96,19 +96,19 @@ class Config(object):
except TypeError: except TypeError:
pass pass
else: else:
#if master/slave group, add default_multi value if length of valu #if master/slave group, add default_multi value if length of value
#if inferior to group length #is inferior of length's group
for child in self._cfgimpl_descr._children: for child in self._cfgimpl_descr._children:
value = self._cfgimpl_values[child._name] if isinstance(child, Option):
if value is None: value = self._cfgimpl_values[child._name]
len_child = 0 if value is None:
value = Multi([], config=self, opt=child, force_append=False) len_child = 0
else: value = Multi([], config=self, opt=child, force_append=False)
len_child = len(value) else:
if len_child < max_len_child: len_child = len(value)
for num in range(len_child, max_len_child): if len_child < max_len_child:
value._append_default() for num in range(len_child, max_len_child):
value._append_default()
def cfgimpl_update(self): def cfgimpl_update(self):
"""dynamically adds `Option()` or `OptionDescription()` """dynamically adds `Option()` or `OptionDescription()`