openload/openload.py
def _check_status(cls, response_json):
        """Check the status of the incoming response, raise exception if status is not 200.

        Args:
            response_json (dict): results of the response of the GET request.

        Returns:
           None

        """
        status = response_json['status']
        msg = response_json['msg']

        if status == 400:
            raise BadRequestException(msg)
        elif status == 403:
            raise PermissionDeniedException(msg)
        elif status == 404:
            raise FileNotFoundException(msg)
        elif status == 451:
            raise UnavailableForLegalReasonsException(msg)
        elif status == 509:
            raise BandwidthUsageExceeded(msg)
        elif status >= 500:
            raise ServerErrorException(msg)
def _check_status(cls, response_json):
        status = response_json['status']
        msg = response_json['msg']

        if status == 400:
            raise BadRequestException(msg)
        elif status == 403:
            raise PermissionDeniedException(msg)
        elif status == 404:
            raise FileNotFoundException(msg)
        elif status == 451:
            raise UnavailableForLegalReasonsException(msg)
        elif status == 509:
            raise BandwidthUsageExceeded(msg)
        elif status >= 500:
            raise ServerErrorException(msg)
def _check_status ( cls , response_json ) : status = response_json [ 'status' ] msg = response_json [ 'msg' ] if status == 400 : raise BadRequestException ( msg ) elif status == 403 : raise PermissionDeniedException ( msg ) elif status == 404 : raise FileNotFoundException ( msg ) elif status == 451 : raise UnavailableForLegalReasonsException ( msg ) elif status == 509 : raise BandwidthUsageExceeded ( msg ) elif status >= 500 : raise ServerErrorException ( msg )
Check the status of the incoming response, raise exception if status is not 200.

        Args:
            response_json (dict): results of the response of the GET request.

        Returns:
           None
Check the status of the incoming response raise exception if status is not 200 .