#NEWLINE# def _validate( raw_config , schemas ) : #NEWLINE# #INDENT# config = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# errors = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# sections = set ( raw_config ) #NEWLINE# for schema in values : #NEWLINE# #INDENT# sections . discard ( schema . name ) #NEWLINE# values = raw_config . get ( schema . name , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# ( result , error ) = schema . deserialize ( values ) #NEWLINE# if error : #NEWLINE# #INDENT# errors [ schema . name ] = error #NEWLINE# #UNINDENT# if result : #NEWLINE# #INDENT# config [ schema . name ] = result #NEWLINE# #UNINDENT# #UNINDENT# for section in sections : #NEWLINE# #INDENT# logger . debug ( 'Ignoring unknown config section: %s' , section ) #NEWLINE# #UNINDENT# return ( config , errors )