U .cH @sPdZddlZdddgZGdddeZGdddeejjZGdddeZ dS) aException classes raised by urllib. The base exception class is URLError, which inherits from OSError. 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. NURLError HTTPErrorContentTooShortErrorc@seZdZdddZddZdS)rNcCs |f|_||_|dk r||_dSN)argsreasonfilename)selfrrr 1/opt/alt/python38/lib64/python3.8/urllib/error.py__init__szURLError.__init__cCs d|jS)Nz)rr r r r __str__szURLError.__str__)N)__name__ __module__ __qualname__r rr r r r rs c@sXeZdZdZejjjZddZddZ ddZ e dd Z e d d Z e jd d Z d S)rzBRaised when HTTP error occurs, but also acts like non-error returncCs:||_||_||_||_||_|dk r6|||||dSr)codemsghdrsfpr_HTTPError__super_init)r Zurlrrrrr r r r 'szHTTPError.__init__cCsd|j|jfS)NzHTTP Error %s: %srrr r r r r4szHTTPError.__str__cCsd|j|jfS)Nzrr r r r __repr__7szHTTPError.__repr__cCs|jSr)rr r r r r<szHTTPError.reasoncCs|jSrrr r r r headers@szHTTPError.headerscCs ||_dSrr)r rr r r rDsN)rrr__doc__urllibresponse addinfourlr rrrpropertyrrsetterr r r r r#s    c@seZdZdZddZdS)rzDException raised when downloaded size does not match content-length.cCst||||_dSr)rr content)r messager!r r r r Ks zContentTooShortError.__init__N)rrrrr r r r r rIs) rZurllib.responser__all__OSErrorrrrrrr r r r s   &