def supported_challenges_validator(data):
 if cli.set_by_cli('standalone_supported_challenges'):
  sys.stderr.write('WARNING: The standalone specific supported challenges flag is deprecated.\nPlease use the --preferred-challenges flag instead.\n')
 challs = data.split(',')
 if ('dvsni' in challs):
  logger.info('Updating legacy standalone_supported_challenges value')
  challs = [(challenges.TLSSNI01.typ if (chall == 'dvsni') else chall) for chall in challs]
  data = ','.join(challs)
 unrecognized = [name for name in challs if (name not in challenges.Challenge.TYPES)]
 if unrecognized:
  raise argparse.ArgumentTypeError('Unrecognized challenges: {0}'.format(', '.join(unrecognized)))
 choices = set((chall.typ for chall in SUPPORTED_CHALLENGES))
 if (not set(challs).issubset(choices)):
  raise argparse.ArgumentTypeError('Plugin does not support the following (valid) challenges: {0}'.format(', '.join((set(challs) - choices))))
 return data

def supported_challenges_validator ( data ) : if cli . set_by_cli ( 'standalone_supported_challenges' ) : sys . stderr . write ( 'WARNING: The standalone specific supported challenges flag is deprecated.\nPlease use the --preferred-challenges flag instead.\n' ) challs = data . split ( ',' ) if ( 'dvsni' in challs ) : logger . info ( 'Updating legacy standalone_supported_challenges value' ) challs = [ ( challenges . TLSSNI01 . typ if ( chall == 'dvsni' ) else chall ) for chall in challs ] data = ',' . join ( challs ) unrecognized = [ name for name in challs if ( name not in challenges . Challenge . TYPES ) ] if unrecognized : raise argparse . ArgumentTypeError ( 'Unrecognized challenges: {0}' . format ( ', ' . join ( unrecognized ) ) ) choices = set ( ( chall . typ for chall in SUPPORTED_CHALLENGES ) ) if ( not set ( challs ) . issubset ( choices ) ) : raise argparse . ArgumentTypeError ( 'Plugin does not support the following (valid) challenges: {0}' . format ( ', ' . join ( ( set ( challs ) - choices ) ) ) ) return data
supported challenges validator for the argparse .