--- a/cubicweb/cwconfig.py Mon Nov 21 14:18:43 2016 +0100
+++ b/cubicweb/cwconfig.py Wed Nov 23 12:24:04 2016 +0100
@@ -202,7 +202,8 @@
from logilab.common.deprecation import deprecated
from logilab.common.logging_ext import set_log_methods, init_log
from logilab.common.configuration import (Configuration, Method,
- ConfigurationMixIn, merge_options)
+ ConfigurationMixIn, merge_options,
+ _validate as lgc_validate)
from cubicweb import (CW_SOFTWARE_ROOT, CW_MIGRATION_MAP,
ConfigurationError, Binary, _)
@@ -420,7 +421,11 @@
def __getitem__(self, key):
"""Get configuration option, by first looking at environmnent."""
file_value = super(CubicWebNoAppConfiguration, self).__getitem__(key)
- return option_value_from_env(key, file_value)
+ value = option_value_from_env(key, file_value)
+ if value is not None:
+ option_def = self.get_option_def(key)
+ value = lgc_validate(value, option_def)
+ return value
# static and class methods used to get instance independant resources ##
@staticmethod