From 3780b6f947ce363421df43540b2418cdb2e9157f Mon Sep 17 00:00:00 2001 From: gwen Date: Tue, 10 Jul 2012 17:20:08 +0200 Subject: [PATCH] refactoring --- config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config.py b/config.py index 4fcfa5d..10eb63e 100644 --- a/config.py +++ b/config.py @@ -156,8 +156,8 @@ class Config(object): self.setoption(name, value, self._cfgimpl_owner) def _validate(self, name, opt_or_descr): + apply_requires(opt_or_descr, self) if not type(opt_or_descr) == OptionDescription: - apply_requires(opt_or_descr, self) # 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,