관리-도구
편집 파일: utils.cpython-36.pyc
3 �ReL � @ s\ d dl mZmZ d dlmZ d dlmZ er<d dlmZm Z ddiZ dd� Zefd d �ZdS )� )�CONTENT_CHUNK_SIZE�Response)�NetworkConnectionError)�MYPY_CHECK_RUNNING)�Dict�IteratorzAccept-Encoding�identityc C s� d}t | jt�rDy| jjd�}W qJ tk r@ | jjd�}Y qJX n| j}d| j ko^dk n rxd| j|| jf }n,d| j ko�dk n r�d| j|| jf }|r�t|| d ��d S ) N� zutf-8z iso-8859-1i� i� z%s Client Error: %s for url: %siX z%s Server Error: %s for url: %s)�response)� isinstance�reason�bytes�decode�UnicodeDecodeError�status_code�urlr )�resp�http_error_msgr � r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/network/utils.py�raise_for_status s r c c s\ y$x| j j|dd�D ] }|V qW W n2 tk rV x| j j|�}|sHP |V q6W Y nX dS )z8Given a requests Response, provide the data chunks. F)�decode_contentN)�raw�stream�AttributeError�read)r � chunk_size�chunkr r r �response_chunks: s r N) Zpip._vendor.requests.modelsr r �pip._internal.exceptionsr �pip._internal.utils.typingr �typingr r �HEADERSr r r r r r �<module> s