azkaban_cli/azkaban.py
def __catch_response_error(self, response, exception, ignore_empty_responses=False):
        """ PRIVATE
        Try to get the answer json. If an error occurs, define response_json as an empty json, send it
        together with the input to the error functions.
        """
        self.__catch_login(response)

        # Some ajax api operations don`t have return body making response.json() raise a ValueError exception
        # The try block enable the __catch_empty_response raise the correct exception
        try:
            response_json = response.json()
        except Exception:
            response_json = {}

        self.__catch_response_error_msg(exception, response_json)
        self.__catch_response_status_error(exception, response_json)

        # Don't raise a exception if we know the request has a empty body
        if not ignore_empty_responses:
            self.__catch_empty_response(exception, response_json)
 PRIVATE
        Try to get the answer json. If an error occurs, define response_json as an empty json, send it
        together with the input to the error functions.
        
PRIVATE
Try to get the answer json. If an error occurs, define response_json as an empty json, send it
together with the input to the error functions.
PRIVATE Try to get the answer json . If an error occurs define response_json as an empty json send it together with the input to the error functions .
def __catch_response_error(self, response, exception, ignore_empty_responses=False):
        self.__catch_login(response)
        try:
            response_json = response.json()
        except Exception:
            response_json = {}
        self.__catch_response_error_msg(exception, response_json)
        self.__catch_response_status_error(exception, response_json)
        if not ignore_empty_responses:
            self.__catch_empty_response(exception, response_json)
def __catch_response_error ( self , response , exception , ignore_empty_responses = False ) : self . __catch_login ( response ) try : response_json = response . json ( ) except Exception : response_json = { } self . __catch_response_error_msg ( exception , response_json ) self . __catch_response_status_error ( exception , response_json ) if not ignore_empty_responses : self . __catch_empty_response ( exception , response_json )
PRIVATE
Try to get the answer json.
PRIVATE Try to get the answer json .
""" PRIVATE
        Try to get the answer json. If an error occurs, define response_json as an empty json, send it
        together with the input to the error functions.
        """ # Some ajax api operations don`t have return body making response.json() raise a ValueError exception # The try block enable the __catch_empty_response raise the correct exception # Don't raise a exception if we know the request has a empty body
self
response
exception
ignore_empty_responses