None is an available value for an auto

This commit is contained in:
gwen 2012-07-05 15:25:36 +02:00
parent 098df1ba76
commit ca277657e5

View File

@ -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()