Fix appending to a non-grouped multi

When the multi is not grouped, just set the value and do not try to
update len of inexistant slaves.

The code path try to update the len of all other variables under the
OptionDescription of the multi.

* tiramisu/option.py (Multi.append): return after setting the value.

Fixes: #4811 @10m
This commit is contained in:
Daniel Dehennin 2013-01-31 16:57:15 +01:00
parent 170698a5e3
commit 03baedd4dd
1 changed files with 3 additions and 0 deletions

View File

@ -79,7 +79,10 @@ class Multi(list):
raise IndexError("in a group with a master, you mustn't add "
"a value in a slave's Multi value")
except TypeError:
# Not a master/slaves
self._setvalue(value, who=settings.get_owner())
return
multis = []
for opt in self.config._cfgimpl_descr._children:
if isinstance(opt, OptionDescription):