#NEWLINE# def handle( client_message , handle_event_entry = None , to_object = None ) : #NEWLINE# #INDENT# ' Event handler ' #NEWLINE# message_type = client_message . get_message_type ( ) #NEWLINE# if ( ( message_type == EVENT_ENTRY ) and ( handle_event_entry is not None ) ) : #NEWLINE# #INDENT# key = None #NEWLINE# if ( not client_message . read_bool ( ) ) : #NEWLINE# #INDENT# key = client_message . read_data ( ) #NEWLINE# #UNINDENT# value = None #NEWLINE# if ( not client_message . read_bool ( ) ) : #NEWLINE# #INDENT# value = client_message . read_data ( ) #NEWLINE# #UNINDENT# old_value = None #NEWLINE# if ( not client_message . read_bool ( ) ) : #NEWLINE# #INDENT# old_value = client_message . read_data ( ) #NEWLINE# #UNINDENT# merging_value = None #NEWLINE# if ( not client_message . read_bool ( ) ) : #NEWLINE# #INDENT# merging_value = client_message . read_data ( ) #NEWLINE# #UNINDENT# event_type = client_message . read_int ( ) #NEWLINE# uuid = client_message . read_str ( ) #NEWLINE# number_of_affected_entries = client_message . read_int ( ) #NEWLINE# handle_event_entry ( key = key , value = value , old_value = old_value , merging_value = merging_value , event_type = event_type , uuid = key , number_of_affected_entries = number_of_affected_entries )