From ca277657e5027cac8b3289810809bb1161430dda Mon Sep 17 00:00:00 2001 From: gwen Date: Thu, 5 Jul 2012 15:25:36 +0200 Subject: [PATCH] None is an available value for an auto --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index c1c6273..df570d2 100644 --- a/config.py +++ b/config.py @@ -205,6 +205,7 @@ class Config(object): else: if owner == 'fill': return value + # ______________________________________________________________ result = special_owner_factory(name, owner, value=value, callback=opt_or_descr.getcallback(), @@ -216,7 +217,7 @@ class Config(object): if type(result) == list: raise ConfigError('invalid calculated value returned' ' for option {0} : shall not be a list'.format(name)) - if not opt_or_descr._validate(result): + if result != None and not opt_or_descr._validate(result): raise ConfigError('invalid calculated value returned' ' for option {0}'.format(name)) @@ -232,6 +233,7 @@ class Config(object): else: _result = result return _result + # ______________________________________________________________ # mandatory options if not isinstance(opt_or_descr, OptionDescription): homeconfig = self._cfgimpl_get_toplevel()