File: //lib/python3.6/site-packages/awscli/customizations/__pycache__/assumerole.cpython-36.opt-1.pyc
3
�T_; � @ s` d dl Z d dlZd dlmZ d dlmZ eje�Ze j j
e j jdddd��Zdd � Z
d
d� ZdS )� N)�ProfileNotFound)�
JSONFileCache�~z.awsZcli�cachec C s | j dtdd� d S )Nzsession-initializedZ&inject_assume_role_cred_provider_cache)Z unique_id)�register�!inject_assume_role_provider_cache)Zevent_handlers� r � /usr/lib/python3.6/assumerole.py�register_assume_role_provider s r
c K sZ y| j d�}W n tk
r, tjd� d S X |jd�}tt�|_|jd�}tt�|_d S )NZcredential_providerz}ProfileNotFound caught when trying to inject assume-role cred provider cache. Not configuring JSONFileCache for assume-role.zassume-rolezassume-role-with-web-identity)Z
get_componentr �LOG�debugZget_providerr � CACHE_DIRr )Zsession�kwargsZ
cred_chainZassume_role_providerZweb_identity_providerr r r r s
r )�osZloggingZbotocore.exceptionsr Zbotocore.credentialsr Z getLogger�__name__r �path�
expanduser�joinr
r
r r r r r �<module> s