tools/perf/core/services/request.py
def BuildRequestError(request, response, content):
  """Build the correct RequestError depending on the response status."""
  if response['status'].startswith('4'):
    error = ClientError
  elif response['status'].startswith('5'):
    error = ServerError
  else:  # Fall back to the base class.
    error = RequestError
  return error(request, response, content)
Build the correct RequestError depending on the response status.
Build the correct RequestError depending on the response status.
Build the correct RequestError depending on the response status .
def BuildRequestError(request, response, content):
  if response['status'].startswith('4'):
    error = ClientError
  elif response['status'].startswith('5'):
    error = ServerError
  else:  
    error = RequestError
  return error(request, response, content)
def BuildRequestError ( request , response , content ) : if response [ 'status' ] . startswith ( '4' ) : error = ClientError elif response [ 'status' ] . startswith ( '5' ) : error = ServerError else : error = RequestError return error ( request , response , content )
Build the correct RequestError depending on the response status.
Build the correct RequestError depending on the response status .
"""Build the correct RequestError depending on the response status.""" # Fall back to the base class.
request
response
content