Fix infinite recursion on calculated master of multi variable
There was a infinite recursion between option.Multi.append() and config.Config._getattr() through config.Config.fill_multi() when calculating the master: - config.Config._getattr() -> config.Config.fill_multi() -> option.Multi.__init__() -> option.Multi.append() -> config.Config._getattr() * tiramisu/option.py (Multi.append): do not pass by config.Config._getattr(). * tiramisu/option.py (Multi.__init__): do not catch exception when appending. Ref: #4799 @8h
This commit is contained in:
parent
deaa0942ff
commit
064bed9efa
|
@ -58,10 +58,7 @@ class Multi(list):
|
||||||
super(Multi, self).__init__(lst)
|
super(Multi, self).__init__(lst)
|
||||||
# we add the slaves without modifying the master
|
# we add the slaves without modifying the master
|
||||||
for l in lst:
|
for l in lst:
|
||||||
try:
|
|
||||||
self.append(l, add_master=False)
|
self.append(l, add_master=False)
|
||||||
except Exception, err:
|
|
||||||
print err
|
|
||||||
else:
|
else:
|
||||||
if force_append:
|
if force_append:
|
||||||
self.config._valid_len(self.opt._name, lst)
|
self.config._valid_len(self.opt._name, lst)
|
||||||
|
@ -84,7 +81,8 @@ class Multi(list):
|
||||||
except TypeError:
|
except TypeError:
|
||||||
self._setvalue(value, who=settings.get_owner())
|
self._setvalue(value, who=settings.get_owner())
|
||||||
multis = []
|
multis = []
|
||||||
for name, multi in self.config:
|
for opt in self.config._cfgimpl_descr._children:
|
||||||
|
multi = self.config._cfgimpl_values[opt._name]
|
||||||
multis.append(multi)
|
multis.append(multi)
|
||||||
for multi in multis:
|
for multi in multis:
|
||||||
if master == multi.opt._name:
|
if master == multi.opt._name:
|
||||||
|
|
Loading…
Reference in New Issue