#NEWLINE# def list_updated( self , values ) : #NEWLINE# #INDENT# ' Handles updates to the list of legal checklist values.\n        ' #NEWLINE# sv = sv . string_value #NEWLINE# if ( ( len ( values ) > 0 ) and isinstance ( values [ 0 ] , basestring ) ) : #NEWLINE# #INDENT# values = [ ( x , sv ( x , capitalize ) ) for x in values ] #NEWLINE# #UNINDENT# self . values = valid_values = [ x [ 0 ] for x in values ] #NEWLINE# self . names = [ x [ 1 ] for x in values ] #NEWLINE# modified = False #NEWLINE# cur_value = parse_value ( self . value ) #NEWLINE# for i in range ( ( len ( cur_value ) - 1 ) , ( - 1 ) , ( - 1 ) ) : #NEWLINE# #INDENT# if ( cur_value [ i ] not in valid_values ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# del cur_value [ i ] #NEWLINE# modified = True #NEWLINE# #UNINDENT# except TypeError as e : #NEWLINE# #INDENT# logger . warn ( 'Unable to remove non-current value [%s] from values %s' , cur_value [ i ] , values ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if modified : #NEWLINE# #INDENT# if isinstance ( self . value , basestring ) : #NEWLINE# #INDENT# cur_value = ',' . join ( cur_value ) #NEWLINE# #UNINDENT# self . value = cur_value #NEWLINE# #UNINDENT# self . rebuild_editor ( )