remove _setoption in SymLinkOption
objimpl_ => optimpl_ ConflictConfigError => ConflictError add read_write/read_only/getowner in Config
This commit is contained in:
@ -166,6 +166,9 @@ class Property(object):
|
||||
def __contains__(self, propname):
|
||||
return propname in self._properties
|
||||
|
||||
def __repr__(self):
|
||||
return str(self._properties)
|
||||
|
||||
|
||||
#____________________________________________________________
|
||||
class Setting(object):
|
||||
@ -188,6 +191,9 @@ class Setting(object):
|
||||
def __contains__(self, propname):
|
||||
return propname in self._get_properties()
|
||||
|
||||
def __repr__(self):
|
||||
return str(self._get_properties())
|
||||
|
||||
def __getitem__(self, opt):
|
||||
return Property(self, self._get_properties(opt), opt)
|
||||
|
||||
@ -281,8 +287,8 @@ class Setting(object):
|
||||
properties.append('mandatory')
|
||||
if self._validate_frozen(opt_or_descr, value, is_write):
|
||||
properties.append('frozen')
|
||||
raise_text = _('cannot change the value to {0} for '
|
||||
'option {1} this option is frozen')
|
||||
raise_text = _('cannot change the value for '
|
||||
'option {0} this option is frozen')
|
||||
if properties != []:
|
||||
raise PropertiesOptionError(raise_text.format(opt_or_descr._name,
|
||||
str(properties)),
|
||||
@ -353,7 +359,7 @@ def apply_requires(opt, config):
|
||||
settings = config.cfgimpl_get_settings()
|
||||
setting = Property(settings, settings._get_properties(opt, False), opt)
|
||||
trigger_actions = build_actions(opt._requires)
|
||||
optpath = config.cfgimpl_get_context().cfgimpl_get_description().objimpl_get_path_by_opt(opt)
|
||||
optpath = config.cfgimpl_get_context().cfgimpl_get_description().optimpl_get_path_by_opt(opt)
|
||||
for requires in trigger_actions.values():
|
||||
matches = False
|
||||
for require in requires:
|
||||
|
Reference in New Issue
Block a user