def validate_boolean_or_string(option, value):
 if isinstance(value, string_type):
  if (value not in ('true', 'false')):
   raise ValueError(("The value of %s must be 'true' or 'false'" % (option,)))
  return (value == 'true')
 return validate_boolean(option, value)

def validate_boolean_or_string ( option , value ) : if isinstance ( value , string_type ) : if ( value not in ( 'true' , 'false' ) ) : raise ValueError ( ( "The value of %s must be 'true' or 'false'" % ( option , ) ) ) return ( value == 'true' ) return validate_boolean ( option , value )
validates that value is true .