tiramisu/value.py : self.opt => opt + disable permissive in read_write mode

This commit is contained in:
Emmanuel Garette 2013-04-03 17:05:41 +02:00
parent e6f00948f3
commit 6105191d9c
2 changed files with 4 additions and 4 deletions

View File

@ -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')

View File

@ -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)