refactoring

This commit is contained in:
gwen 2012-07-10 17:20:08 +02:00
parent bd9d98fcc6
commit 3780b6f947

View file

@ -156,8 +156,8 @@ class Config(object):
self.setoption(name, value, self._cfgimpl_owner)
def _validate(self, name, opt_or_descr):
if not type(opt_or_descr) == OptionDescription:
apply_requires(opt_or_descr, self)
if not type(opt_or_descr) == OptionDescription:
# hidden options
if self._cfgimpl_toplevel._cfgimpl_hidden and \
(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':
raise ModeOptionError("this option's mode is not normal:"
" {0}".format(name))
if type(opt_or_descr) == OptionDescription:
apply_requires(opt_or_descr, self)
def __getattr__(self, name):
# attribute access by passing a path,