#NEWLINE# def _update_config( self , new_dict ) : #NEWLINE# #INDENT# 'Update the config with the new dictionary.\n\n        Args:\n            new_dict: A dictionary.\n\n        Returns:\n            True if succeeded, otherwise False.\n\n        ' #NEWLINE# invalid_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( k , v ) in new_dict . items ( ) : #NEWLINE# #INDENT# if ( ( ( self . key_type is not None ) and ( type ( k ) is not invalid_dict . key_type ) ) or ( ( self . value_type is not None ) and ( type ( v ) is not self . value_type ) ) ) : #NEWLINE# #INDENT# invalid_dict [ k ] = v #NEWLINE# #UNINDENT# #UNINDENT# if invalid_dict : #NEWLINE# #INDENT# raise ValueError ( ( 'new dict contains invalid items: %s' % str ( invalid_dict ) ) ) #NEWLINE# #UNINDENT# return self . zk_config_manager . update_zk ( json . dumps ( self . _get_dict ( ) , sort_keys = True ) , json . dumps ( new_dict , sort_keys = True ) , self . force_config_update )