def _get_config_errors(request, cache=True):
 global _CONFIG_ERROR_LIST
 if ((not cache) or (_CONFIG_ERROR_LIST is None)):
  error_list = []
  for module in appmanager.DESKTOP_MODULES:
   try:
    validator = getattr(module.conf, CONFIG_VALIDATOR)
   except AttributeError:
    continue
   if (not callable(validator)):
    LOG.warn(('Auto config validation: %s.%s is not a function' % (module.conf.__name__, CONFIG_VALIDATOR)))
    continue
   try:
    for (confvar, error) in validator(request.user):
     error = {'name': (confvar if isinstance(confvar, str) else confvar.get_fully_qualifying_key()), 'message': error}
     if isinstance(confvar, BoundConfig):
      error['value'] = confvar.get()
     error_list.append(error)
   except Exception as ex:
    LOG.exception(('Error in config validation by %s: %s' % (module.nice_name, ex)))
  _CONFIG_ERROR_LIST = error_list
 return _CONFIG_ERROR_LIST

def _get_config_errors ( request , cache = True ) : global _CONFIG_ERROR_LIST if ( ( not cache ) or ( _CONFIG_ERROR_LIST is None ) ) : error_list = [ ] for module in appmanager . DESKTOP_MODULES : try : validator = getattr ( module . conf , CONFIG_VALIDATOR ) except AttributeError : continue if ( not callable ( validator ) ) : LOG . warn ( ( 'Auto config validation: %s.%s is not a function' % ( module . conf . __name__ , CONFIG_VALIDATOR ) ) ) continue try : for ( confvar , error ) in validator ( request . user ) : error = { 'name' : ( confvar if isinstance ( confvar , str ) else confvar . get_fully_qualifying_key ( ) ) , 'message' : error } if isinstance ( confvar , BoundConfig ) : error [ 'value' ] = confvar . get ( ) error_list . append ( error ) except Exception as ex : LOG . exception ( ( 'Error in config validation by %s: %s' % ( module . nice_name , ex ) ) ) _CONFIG_ERROR_LIST = error_list return _CONFIG_ERROR_LIST
returns a list of tuples .