File: //lib/python3/dist-packages/awscli/customizations/__pycache__/assumerole.cpython-38.pyc
U
<�^; � @ s` d dl Z d dlZd dlmZ d dlmZ e�e�Ze j �
e j �dddd��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 �B/usr/lib/python3/dist-packages/awscli/customizations/assumerole.py�register_assume_role_provider s �r
c K s\ z| � d�}W n tk
r. t�d� Y d S X |�d�}tt�|_|�d�}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