U
    W+d\	                     @   s|   d dl mZ d dlmZ G dd deZG dd deZG dd deZG d	d
 d
eZG dd deZG dd deZ	dS )    )BotoServerError)ResponseFactoryc                   @   s   e Zd ZdddZdS )ResponseErrorFactoryNc                 C   s6   t |||d}| |jdt}t|j ||||dS )N)body )r   Zfind_elementZ
error_codeResponseErrorprint__name__)selfstatusreasonr   serverZsupplied r   6/tmp/pip-unpacked-wheel-dlxw5sjy/boto/mws/exception.py__call__   s    
zResponseErrorFactory.__call__)N)r	   
__module____qualname__r   r   r   r   r   r      s   r   c                   @   s$   e Zd ZdZdZdd Zdd ZdS )r   z#
    Undefined response error.
    Fc                 C   s   d | j| S )Nz'{0.__name__}({1.reason}: "{1.message}"))format	__class__)r
   r   r   r   __repr__(   s     zResponseError.__repr__c                 C   s4   | j r| j  d pd}d| | j| jr,dp.d|S )N
r   z+{1.__name__}: {0.reason} {2}
{3}{0.message}z(Retriable))__doc__stripr   r   retry)r
   docr   r   r   __str__,   s      zResponseError.__str__N)r	   r   r   r   r   r   r   r   r   r   r   r   "   s   r   c                   @   s   e Zd ZdZdS )RetriableResponseErrorTN)r	   r   r   r   r   r   r   r   r   3   s   r   c                   @   s   e Zd ZdZdS )InvalidParameterValuezA
    One or more parameter values in the request is invalid.
    Nr	   r   r   r   r   r   r   r   r   7   s   r   c                   @   s   e Zd ZdZdS )InvalidParameterz;
    One or more parameters in the request is invalid.
    Nr   r   r   r   r   r   =   s   r   c                   @   s   e Zd ZdZdS )InvalidAddressz
    Invalid address.
    Nr   r   r   r   r   r    C   s   r    N)
Zboto.exceptionr   Zboto.mws.responser   r   r   r   r   r   r    r   r   r   r   <module>   s   	