def _MakeRetriableRequest(self, stub_method, request):
    absolute_deadline_seconds = time.clock() + self._query_deadline_seconds
    response = self.MakeRequestImpl(stub_method, request)
    if not response.HasField('sql_exception'):
      return response
    sql_exception = response.sql_exception
    if (sql_exception.application_error_code !=
        client_error_code_pb2.SqlServiceClientError.ERROR_TIMEOUT):
      raise _ToDbApiException(sql_exception)
    if time.clock() >= absolute_deadline_seconds:
      raise _ToDbApiException(sql_exception)
    return self._Retry(stub_method, request.request_id,
                       absolute_deadline_seconds)
Makes a retriable request.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/storage/speckle/python/api/rdbms.py/Connection._MakeRetriableRequest