#NEWLINE# def parse( self , value ) : #NEWLINE# #INDENT# value = super ( ChoiceOpt , self ) . parse ( self ) #NEWLINE# if ( value is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if isinstance ( value , ( list , tuple ) ) : #NEWLINE# #INDENT# check_values = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# check_values = [ value ] #NEWLINE# #UNINDENT# for cv in check_values : #NEWLINE# #INDENT# if ( cv not in self . choices ) : #NEWLINE# #INDENT# raise ValueError ( ( '%s is not a valid choice for %s!' % ( cv , self . name ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return value