관리-도구
편집 파일: auth.cpython-37.pyc
B ��Re�- � @ s( d Z ddlZddlmZmZ ddlmZ ddlmZ ddl mZmZm Z mZmZ ddlmZ er�ddlmZmZmZmZmZ dd lmZ dd lmZmZ eeeef Ze�e �Z!yddl"a"W nN e#k r� da"Y n8 e$k �r Z% ze!�&dee%�� da"W ddZ%[%X Y nX dd � Z'G dd� de�Z(dS )z�Network Authentication Helpers Contains interface (MultiDomainBasicAuth) and associated glue code for providing credentials in the context of network requests. � N)�AuthBase� HTTPBasicAuth)�get_netrc_auth)�parse)�ask� ask_input�ask_password�remove_auth_from_url�split_auth_netloc_from_url)�MYPY_CHECK_RUNNING)�Dict�Optional�Tuple�List�Any)�AuthInfo)�Response�Requestz*Keyring is skipped due to an exception: %sc C s� | rt sdS yzy t j}W n tk r, Y n0X t�d| � || |�}|dk rX|j|jfS dS |r�t�d| � t �| |�}|r�||fS W n6 tk r� } zt� dt |�� da W dd}~X Y nX dS )z3Return the tuple auth for a given url from keyring.Nz'Getting credentials from keyring for %sz$Getting password from keyring for %sz*Keyring is skipped due to an exception: %s)�keyring�get_credential�AttributeError�logger�debug�username�password�get_password� Exception�warning�str)�urlr r �credr �exc� r"