def _update_ssl_config(opts):
 if (opts['ssl'] is None):
  return
 import ssl
 for (key, prefix) in (('cert_reqs', 'CERT_'), ('ssl_version', 'PROTOCOL_')):
  val = opts['ssl'].get(key)
  if (val is None):
   continue
  if ((not isinstance(val, string_types)) or (not val.startswith(prefix)) or (not hasattr(ssl, val))):
   message = "SSL option '{0}' must be set to one of the following values: '{1}'.".format(key, "', '".join([val for val in dir(ssl) if val.startswith(prefix)]))
   log.error(message)
   raise salt.exceptions.SaltConfigurationError(message)
  opts['ssl'][key] = getattr(ssl, val)

def _update_ssl_config ( opts ) : if ( opts [ 'ssl' ] is None ) : return import ssl for ( key , prefix ) in ( ( 'cert_reqs' , 'CERT_' ) , ( 'ssl_version' , 'PROTOCOL_' ) ) : val = opts [ 'ssl' ] . get ( key ) if ( val is None ) : continue if ( ( not isinstance ( val , string_types ) ) or ( not val . startswith ( prefix ) ) or ( not hasattr ( ssl , val ) ) ) : message = "SSL option '{0}' must be set to one of the following values: '{1}'." . format ( key , "', '" . join ( [ val for val in dir ( ssl ) if val . startswith ( prefix ) ] ) ) log . error ( message ) raise salt . exceptions . SaltConfigurationError ( message ) opts [ 'ssl' ] [ key ] = getattr ( ssl , val )
resolves string names to integer constant in ssl configuration .