go dZddlZddlZgdZGddeZGddeejjZ Gdd eZ y) 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. N)URLError HTTPErrorContentTooShortErrorceZdZddZdZy)rNc6|f|_||_|||_yyN)argsreasonfilename)selfr r s 3/opt/alt/python312/lib64/python3.12/urllib/error.py__init__zURLError.__init__s$G   $DM c d|jzS)Nz)r r s r __str__zURLError.__str__s#dkk11rr)__name__ __module__ __qualname__rrrr rrs % 2rrceZdZdZej j jZdZdZ dZ e dZ e dZ e jdZ y) rzBRaised when HTTP error occurs, but also acts like non-error returnc||_||_||_||_||_|t j }|j||||yr)codemsghdrsfpr ioBytesIO_HTTPError__super_init)r urlrrrrs r rzHTTPError.__init__'sI   :B "dC.rc:d|jd|jS)Nz HTTP Error : rrrs r rzHTTPError.__str__1s&*ii::rc<d|jd|jdS)Nz r#rs r __repr__zHTTPError.__repr__4s'+yy$((;;rc|jSr)rrs r r zHTTPError.reason9s xxrc|jSrrrs r headerszHTTPError.headers=s yyrc||_yrr))r r*s r r*zHTTPError.headersAs  rN)rrr__doc__urllibresponse addinfourlrrrr&propertyr r*setterrrr rr#siL??--66L/;<  ^^rrceZdZdZdZy)rzDException raised when downloaded size does not match content-length.c>tj||||_yr)rrcontent)r messager4s r rzContentTooShortError.__init__Hs$( rN)rrrr,rrrr rrFs Nrr) r,rurllib.responser-__all__OSErrorrr.r/rrrrr r9sH   ; 2w 2 &//44 F8r