From 064bed9efa49123e2cfb10d62f4460c27fa87986 Mon Sep 17 00:00:00 2001 From: Daniel Dehennin Date: Wed, 30 Jan 2013 14:51:29 +0100 Subject: [PATCH] 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 --- tiramisu/option.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tiramisu/option.py b/tiramisu/option.py index be1e81f..8cb6638 100644 --- a/tiramisu/option.py +++ b/tiramisu/option.py @@ -58,10 +58,7 @@ class Multi(list): super(Multi, self).__init__(lst) # we add the slaves without modifying the master for l in lst: - try: - self.append(l, add_master=False) - except Exception, err: - print err + self.append(l, add_master=False) else: if force_append: self.config._valid_len(self.opt._name, lst) @@ -84,7 +81,8 @@ class Multi(list): except TypeError: self._setvalue(value, who=settings.get_owner()) 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) for multi in multis: if master == multi.opt._name: