o ,º]› ã@spdZddlmZmZmZddlmZddlmZ gd¢Z Gdd„de ƒZ Gdd „d e e j ƒZGd d „d e ƒZd S) aïException classes raised by urllib. The base exception class is URLError, which inherits from IOError. It doesn't define any behavior of its own, but is the base class for all exceptions defined in this package. HTTPError is an exception class that is also a valid HTTP response instance. It behaves this way because HTTP protocol errors are valid responses, with a status code, headers, and a body. In some contexts, an application may want to handle an exception like a regular response. é)Úabsolute_importÚdivisionÚunicode_literals)Ústandard_library)Úresponse)ÚURLErrorÚ HTTPErrorÚContentTooShortErrorc@seZdZddd„Zdd„ZdS)rNcCs$|f|_||_|dur||_dSdS©N)ÚargsÚreasonÚfilename)Úselfr r ©rú?/usr/lib/python3/dist-packages/future/backports/urllib/error.pyÚ__init__ s  ÿzURLError.__init__cCs d|jS)Nz)r ©rrrrÚ__str__&s zURLError.__str__r )Ú__name__Ú __module__Ú __qualname__rrrrrrrs  rc@s<eZdZdZejjZdd„Zdd„Ze dd„ƒZ dd „Z d S) rzBRaised when HTTP error occurs, but also acts like non-error returncCs>||_||_||_||_||_|dur| ||||¡dSdSr )ÚcodeÚmsgÚhdrsÚfpr Ú_HTTPError__super_init)rÚurlrrrrrrrr-sÿzHTTPError.__init__cCsd|j|jfS)NzHTTP Error %s: %s)rrrrrrr:szHTTPError.__str__cCó|jSr )rrrrrr ?szHTTPError.reasoncCrr )rrrrrÚinfoCszHTTPError.infoN) rrrÚ__doc__Úurllib_responseÚ addinfourlrrrÚpropertyr rrrrrr)s   rc@seZdZdd„ZdS)r cCst ||¡||_dSr )rrÚcontent)rÚmessager#rrrrIs  zContentTooShortError.__init__N)rrrrrrrrr Hs r N)rÚ __future__rrrÚfuturerÚfuture.backports.urllibrr Ú__all__ÚIOErrorrr!rr rrrrÚs