File: //lib/python3/dist-packages/botocore/retries/__pycache__/special.cpython-310.pyc
o
.&�aK � @ sR d Z ddlZddlmZ ddlmZ e�e�ZG dd� de�Z G dd� de�Z
dS ) z�Special cased retries.
These are additional retry cases we still have to handle from the legacy
retry handler. They don't make sense as part of the standard mode retry
module. Ideally we should be able to remove this module.
� N)�crc32)�BaseRetryableCheckerc @ s e Zd ZdZdd� ZdS )�RetryIDPCommunicationError�stsc C s( |j jj}|| jkrdS |�� }|dkS )NF�IDPCommunicationError)�operation_model�
service_model�service_name�
_SERVICE_NAME�get_error_code)�self�contextr �
error_code� r �:/usr/lib/python3/dist-packages/botocore/retries/special.py�is_retryable s
z'RetryIDPCommunicationError.is_retryableN)�__name__�
__module__�__qualname__r
r r r r r r s r c @ s e Zd ZdZdZdd� ZdS )�RetryDDBChecksumErrorzx-amz-crc32�dynamodbc C st |j jj}|| jkrdS |jd u rdS |jj�| j�}|d u r!dS t|jj �d@ }|t
|�kr8t�d||� dS d S )NFl �� z@DynamoDB crc32 checksum does not match, expected: %s, actual: %sT)
r r r r
�
http_response�headers�get�_CHECKSUM_HEADERr �content�int�logger�debug)r r
r �checksum�actual_crc32r r r r # s
��z"RetryDDBChecksumError.is_retryableN)r r r r r
r r r r r r s r )�__doc__�logging�binasciir �botocore.retries.baser � getLoggerr r r r r r r r �<module> s