#NEWLINE# def add( self , error ) : #NEWLINE# #INDENT# error_path = self . _path_of_ ( error ) #NEWLINE# key = error_path [ self . depth ] #NEWLINE# if ( error_path not in self . descendants ) : #NEWLINE# #INDENT# self [ key ] = ErrorTreeNode ( error_path , self ) #NEWLINE# #UNINDENT# if ( len ( error_path ) == ( self . depth + 1 ) ) : #NEWLINE# #INDENT# self [ key ] . errors . append ( error ) #NEWLINE# self [ key ] . errors . sort ( ) #NEWLINE# if error . is_group_error : #NEWLINE# #INDENT# for child_error in error . info [ 0 ] : #NEWLINE# #INDENT# self . tree_root += child_error #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self [ key ] += error