From 6105191d9cbb3a7760f25bed5b06b60338eece74 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 3 Apr 2013 17:05:41 +0200 Subject: [PATCH] tiramisu/value.py : self.opt => opt + disable permissive in read_write mode --- tiramisu/setting.py | 2 +- tiramisu/value.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tiramisu/setting.py b/tiramisu/setting.py index 1c1e8db..90918f0 100644 --- a/tiramisu/setting.py +++ b/tiramisu/setting.py @@ -242,4 +242,4 @@ class Setting(object): self.enable_property('disabled') self.disable_property('mandatory') self.disable_property('validator') - self.enable_property('permissive') + self.disable_property('permissive') diff --git a/tiramisu/value.py b/tiramisu/value.py index 24b268d..9f9e4d6 100644 --- a/tiramisu/value.py +++ b/tiramisu/value.py @@ -160,7 +160,7 @@ class Values(object): if opt.is_multi(): if opt.multitype == multitypes.master: masterlen = len(value) - for slave in self.opt.master_slaves: + for slave in opt.master_slaves: value_slave = self._get_value(slave) if len(value_slave) > masterlen: raise MultiTypeError("invalid len for the slave: {0}" @@ -171,10 +171,10 @@ class Values(object): value_slave.append(None, force=True) elif opt.multitype == multitypes.slave: - if len(self._get_value(self.opt.master_slaves)) != len(value): + if len(self._get_value(opt.master_slaves)) != len(value): raise MultiTypeError("invalid len for the slave: {0}" " which has {1} as master".format( - opt._name, self.opt.master_slaves._name)) + opt._name, opt.master_slaves._name)) if not isinstance(value, Multi): value = Multi(value, self.context, opt) self.setitem(opt, value)