parameters: (server, email=None, host_override=None, save_cookies=True,
                   account_type=AUTH_ACCOUNT_TYPE)
return_statement: return HttpRpcServer(server,
                         KeyringCreds(server, host, email).GetUserCredentials,
                         host_override=host_override,
                         save_cookies=save_cookies,
                         account_type=account_type)
docstring: Returns an instance of an AbstractRpcServer.
  
    Args:
      server: String containing the review server URL.
      email: String containing user's email address.
      host_override: If not None, string containing an alternate hostname to use
        in the host header.
      save_cookies: Whether authentication cookies should be saved to disk.
      account_type: Account type for authentication, either 'GOOGLE'
        or 'HOSTED'. Defaults to AUTH_ACCOUNT_TYPE.
  
    Returns:
      A new HttpRpcServer, on which RPC calls can be made.
docstring_summary: Returns an instance of an AbstractRpcServer.
docstring_tokens: Returns an instance of an AbstractRpcServer .
function: def GetRpcServer(server, email=None, host_override=None, save_cookies=True,
                   account_type=AUTH_ACCOUNT_TYPE):
    """Returns an instance of an AbstractRpcServer.
  
    Args:
      server: String containing the review server URL.
      email: String containing user's email address.
      host_override: If not None, string containing an alternate hostname to use
        in the host header.
      save_cookies: Whether authentication cookies should be saved to disk.
      account_type: Account type for authentication, either 'GOOGLE'
        or 'HOSTED'. Defaults to AUTH_ACCOUNT_TYPE.
  
    Returns:
      A new HttpRpcServer, on which RPC calls can be made.
    """
  
    # If this is the dev_appserver, use fake authentication.
    host = (host_override or server).lower()
    if re.match(r'(http://)?localhost([:/]|$)', host):
      if email is None:
        email = "test@example.com"
        logging.info("Using debug user %s.  Override with --email" % email)
      server = HttpRpcServer(
          server,
          lambda: (email, "password"),
          host_override=host_override,
          extra_headers={"Cookie":
                         'dev_appserver_login="%s:False"' % email},
          save_cookies=save_cookies,
          account_type=account_type)
      # Don't try to talk to ClientLogin.
      server.authenticated = True
      return server
  
    return HttpRpcServer(server,
                         KeyringCreds(server, host, email).GetUserCredentials,
                         host_override=host_override,
                         save_cookies=save_cookies,
                         account_type=account_type)
function_tokens: def GetRpcServer ( server , email = None , host_override = None , save_cookies = True , account_type = AUTH_ACCOUNT_TYPE ) : # If this is the dev_appserver, use fake authentication. host = ( host_override or server ) . lower ( ) if re . match ( r'(http://)?localhost([:/]|$)' , host ) : if email is None : email = "test@example.com" logging . info ( "Using debug user %s.  Override with --email" % email ) server = HttpRpcServer ( server , lambda : ( email , "password" ) , host_override = host_override , extra_headers = { "Cookie" : 'dev_appserver_login="%s:False"' % email } , save_cookies = save_cookies , account_type = account_type ) # Don't try to talk to ClientLogin. server . authenticated = True return server return HttpRpcServer ( server , KeyringCreds ( server , host , email ) . GetUserCredentials , host_override = host_override , save_cookies = save_cookies , account_type = account_type )