refactoring
This commit is contained in:
parent
bd9d98fcc6
commit
3780b6f947
|
@ -156,8 +156,8 @@ class Config(object):
|
||||||
self.setoption(name, value, self._cfgimpl_owner)
|
self.setoption(name, value, self._cfgimpl_owner)
|
||||||
|
|
||||||
def _validate(self, name, opt_or_descr):
|
def _validate(self, name, opt_or_descr):
|
||||||
|
apply_requires(opt_or_descr, self)
|
||||||
if not type(opt_or_descr) == OptionDescription:
|
if not type(opt_or_descr) == OptionDescription:
|
||||||
apply_requires(opt_or_descr, self)
|
|
||||||
# hidden options
|
# hidden options
|
||||||
if self._cfgimpl_toplevel._cfgimpl_hidden and \
|
if self._cfgimpl_toplevel._cfgimpl_hidden and \
|
||||||
(opt_or_descr._is_hidden() or self._cfgimpl_descr._is_hidden()):
|
(opt_or_descr._is_hidden() or self._cfgimpl_descr._is_hidden()):
|
||||||
|
@ -174,8 +174,6 @@ class Config(object):
|
||||||
if opt_or_descr.get_mode() != 'normal':
|
if opt_or_descr.get_mode() != 'normal':
|
||||||
raise ModeOptionError("this option's mode is not normal:"
|
raise ModeOptionError("this option's mode is not normal:"
|
||||||
" {0}".format(name))
|
" {0}".format(name))
|
||||||
if type(opt_or_descr) == OptionDescription:
|
|
||||||
apply_requires(opt_or_descr, self)
|
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
# attribute access by passing a path,
|
# attribute access by passing a path,
|
||||||
|
|
Loading…
Reference in New Issue