refactoring

This commit is contained in:
gwen 2012-07-10 17:20:08 +02:00
parent bd9d98fcc6
commit 3780b6f947
1 changed files with 1 additions and 3 deletions

View File

@ -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):
if not type(opt_or_descr) == OptionDescription:
apply_requires(opt_or_descr, self) apply_requires(opt_or_descr, self)
if not type(opt_or_descr) == OptionDescription:
# 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,