#NEWLINE# def set( self , key , value ) : #NEWLINE# #INDENT# key = self . validate_key ( key ) #NEWLINE# if ( key is None ) : #NEWLINE# #INDENT# log . error ( ( 'not setting the key:%s as key failed validation' % key ) ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# value = self . validate ( value ) #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# log . error ( ( 'not setting value for the key:%s as value failed validation' % key ) ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# ( key , value ) = self . _convert_key_value ( key , value ) #NEWLINE# self . _reload_config_data ( ) #NEWLINE# if ( ( key not in self . _get_dict ( ) ) or ( self . _get_dict ( ) [ key ] != value ) ) : #NEWLINE# #INDENT# new_dict = dict ( self . _get_dict ( ) ) #NEWLINE# new_dict [ key ] = value #NEWLINE# if self . _update_config ( new_dict ) : #NEWLINE# #INDENT# return 1 #NEWLINE# #UNINDENT# #UNINDENT# return 0