def extract_bool(name, value):
 if (str(value).lower() not in ('true', 'false')):
  raise ValueError((_('Unrecognized value "%(value)s" for "%(name)s", acceptable values are: true, false.') % {'value': value, 'name': name}))
 return strutils.bool_from_string(value, strict=True)

def extract_bool ( name , value ) : if ( str ( value ) . lower ( ) not in ( 'true' , 'false' ) ) : raise ValueError ( ( _ ( 'Unrecognized value "%(value)s" for "%(name)s", acceptable values are: true, false.' ) % { 'value' : value , 'name' : name } ) ) return strutils . bool_from_string ( value , strict = True )
convert any true/false string to its corresponding boolean value .