관리-도구
편집 파일: auth.cpython-36.pyc
3 �Re�- � @ s( d Z ddlZddlmZmZ ddlmZ ddlmZ ddl mZmZm Z mZmZ ddlmZ er�ddlmZmZmZmZmZ dd lmZ dd lmZmZ eeeef Zeje �Z!yddl"a"W nN e#k r� da"Y n8 e$k �r Z% ze!j&dee%�� da"W Y ddZ%[%X 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� | st rdS yzy t j}W n tk r0 Y n0X tjd| � || |�}|dk r\|j|jfS dS |r�tjd| � t j| |�}|r�||fS W n6 tk r� } ztj dt |�� da W Y dd}~X 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"