#NEWLINE# def remove_email( self , address ) : #NEWLINE# #INDENT# if ( address == self . email_address ) : #NEWLINE# #INDENT# raise CannotRemovePrimaryEmail ( ) #NEWLINE# #UNINDENT# with self . db . get_cursor ( ) as c : #NEWLINE# #INDENT# add_event ( c , 'participant' , dict ( id = self . id , action = 'remove' , values = dict ( email = address ) ) ) #NEWLINE# c . run ( 'DELETE FROM emails WHERE participant_id=%s AND address=%s' , ( self . id , address ) )