diff --git a/option.py b/option.py index 7e7fc16..d32101d 100644 --- a/option.py +++ b/option.py @@ -46,15 +46,22 @@ class Multi(list): return self.child.default_multi def __setitem__(self, key, value): + if value is None: + owner = 'default' + else: + owner = default_owner + self.child.setowner(self.config, owner) if value != None and not self.child._validate(value): raise ConfigError("invalid value {0} " "for option {1}".format(str(value), self.child._name)) # FIXME : and if value is None ??? return super(Multi, self).__setitem__(key, value) - def append(self, value, owner=default_owner): - if owner is None: + def append(self, value): + if value is None: owner = 'default' + else: + owner = default_owner self.child.setowner(self.config, owner) # changer dans la config la valeur par défaut et le owner if value != None and not self.child._validate(value):