Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/util/response.pyo

ó
“tÆ_c@@sOddlmZddlmZddlmZd„Zd„Zd„Z	dS(	i(tabsolute_importi(thttp_client(tHeaderParsingErrorcC@svy|jƒSWntk
r!nXy|jSWntk
r@nXy|jdkSWntk
renXtdƒ‚dS(st
    Checks whether a given file-like object is closed.

    :param obj:
        The file-like object to check.
    s)Unable to determine whether fp is closed.N(tisclosedtAttributeErrortclosedtfptNonet
ValueError(tobj((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/util/response.pytis_fp_closeds


cC@sÁt|tjƒs0tdjt|ƒƒƒ‚nt|ddƒ}t|ddƒ}d}|r™|jƒs™|ƒ}t|t	t
fƒr–|}q–q™n|s¥|r½td|d|ƒ‚ndS(sP
    Asserts whether all headers have been successfully parsed.
    Extracts encountered errors from the result of parsing headers.

    Only works on Python 3.

    :param headers: Headers to verify.
    :type headers: `httplib.HTTPMessage`.

    :raises urllib3.exceptions.HeaderParsingError:
        If parsing errors are found.
    s"expected httplib.Message, got {0}.tdefectstget_payloadt
unparsed_dataN(t
isinstancethttplibtHTTPMessaget	TypeErrortformatttypetgetattrRtis_multiparttbyteststrR(theadersRRR
tpayload((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/util/response.pytassert_header_parsing&s	cC@s2|j}t|tƒr"|dkS|jƒdkS(s°
    Checks whether the request of a response has been a HEAD-request.
    Handles the quirks of AppEngine.

    :param conn:
    :type conn: :class:`httplib.HTTPResponse`
    itHEAD(t_methodRtinttupper(tresponsetmethod((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/util/response.pytis_response_to_headJs		
N(
t
__future__Rtpackages.six.movesRRt
exceptionsRR
RR!(((sR/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/urllib3/util/response.pyt<module>s
		$
Back to Directory File Manager