None is an available value for an auto
authorgwen <gremond@cadoles.com>
Thu, 5 Jul 2012 13:25:36 +0000 (15:25 +0200)
committergwen <gremond@cadoles.com>
Thu, 5 Jul 2012 13:25:36 +0000 (15:25 +0200)
config.py

index c1c6273..df570d2 100644 (file)
--- 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()