ó
ÅCRc           @   sT  d  e  f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d	     YZ d
 e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ	 d e f d     YZ
 d e
 e f d     YZ d e
 f d     YZ d e f d     YZ d e f d     YZ d e e f d     YZ d S(   t	   HTTPErrorc           B   s   e  Z d  Z RS(   s#   Base exception used by this module.(   t   __name__t
   __module__t   __doc__(    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR    
   s   t	   PoolErrorc           B   s    e  Z d  Z d   Z d   Z RS(   s/   Base exception for errors caused within a pool.c         C   s'   | |  _  t j |  d | | f  d  S(   Ns   %s: %s(   t   poolR    t   __init__(   t   selfR   t   message(    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR      s    	c         C   s   |  j  d f S(   N(   NN(   t	   __class__t   None(   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyt
   __reduce__   s    (   R   R   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR      s   	t   RequestErrorc           B   s    e  Z d  Z d   Z d   Z RS(   s8   Base exception for PoolErrors that have associated URLs.c         C   s    | |  _  t j |  | |  d  S(   N(   t   urlR   R   (   R   R   R   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR      s    	c         C   s   |  j  d  |  j d  f f S(   N(   R	   R
   R   (   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR       s    (   R   R   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR      s   	t   SSLErrorc           B   s   e  Z d  Z RS(   s9   Raised when SSL certificate fails in an HTTPS connection.(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   %   s   t
   ProxyErrorc           B   s   e  Z d  Z RS(   s,   Raised when the connection to a proxy fails.(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   *   s   t   DecodeErrorc           B   s   e  Z d  Z RS(   s;   Raised when automatic decoding based on Content-Type fails.(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   /   s   t   MaxRetryErrorc           B   s   e  Z d  Z d d  Z RS(   s6   Raised when the maximum number of retries is exceeded.c         C   sZ   | |  _  d | } | r6 | d t |  | f 7} n
 | d 7} t j |  | | |  d  S(   Ns!   Max retries exceeded with url: %ss    (Caused by %s: %s)s    (Caused by redirect)(   t   reasont   typeR   R   (   R   R   R   R   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   9   s    	

N(   R   R   R   R
   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   6   s   t   HostChangedErrorc           B   s   e  Z d  Z d d  Z RS(   s?   Raised when an existing pool gets a request for a foreign host.i   c         C   s-   d | } t  j |  | | |  | |  _ d  S(   Ns)   Tried to open a foreign host with url: %s(   R   R   t   retries(   R   R   R   R   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   H   s    
(   R   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   E   s   t   TimeoutStateErrorc           B   s   e  Z d  Z RS(   s3    Raised when passing an invalid state to a timeout (   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   N   s   t   TimeoutErrorc           B   s   e  Z d  Z RS(   sĄ    Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    (   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   S   s   t   ReadTimeoutErrorc           B   s   e  Z d  Z RS(   sF   Raised when a socket timeout occurs while receiving data from a server(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   \   s   t   ConnectTimeoutErrorc           B   s   e  Z d  Z RS(   s@   Raised when a socket timeout occurs while connecting to a server(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   c   s   t   EmptyPoolErrorc           B   s   e  Z d  Z RS(   sC   Raised when a pool runs out of connections and no more are allowed.(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   h   s   t   ClosedPoolErrorc           B   s   e  Z d  Z RS(   sC   Raised when a request enters a pool after the pool has been closed.(   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   m   s   t   LocationParseErrorc           B   s   e  Z d  Z d   Z RS(   s=   Raised when get_host or similar fails to parse the URL input.c         C   s'   d | } t  j |  |  | |  _ d  S(   Ns   Failed to parse: %s(   R    R   t   location(   R   R   R   (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   u   s    
(   R   R   R   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyR   r   s   N(   t	   ExceptionR    R   R   R   R   R   R   R   R   R   R   R   R   R   t
   ValueErrorR   (    (    (    s6   /usr/lib/python2.7/dist-packages/urllib3/exceptions.pyt   <module>
   s   		