(self, result, repeat_record)
return attempt
route the result to the success, failure, or exception handlers

        result may be either a response object or an exception
route the result to the success, failure, or exception handlers
route the result to the success failure or exception handlers
def handle_response(self, result, repeat_record):
        """
        route the result to the success, failure, or exception handlers

        result may be either a response object or an exception
        """
        if isinstance(result, Exception):
            attempt = repeat_record.handle_exception(result)
        elif is_response(result) and 200 <= result.status_code < 300 or result is True:
            attempt = repeat_record.handle_success(result)
        else:
            attempt = repeat_record.handle_failure(result)
        return attempt
def handle_response ( self , result , repeat_record ) : if isinstance ( result , Exception ) : attempt = repeat_record . handle_exception ( result ) elif is_response ( result ) and 200 <= result . status_code < 300 or result is True : attempt = repeat_record . handle_success ( result ) else : attempt = repeat_record . handle_failure ( result ) return attempt