o
    !d;                     @   s`   d dl Z d dlZd dlmZ d dlmZ eeZe j	
e j	ddddZdd	 Zd
d ZdS )    N)ProfileNotFound)JSONFileCache~z.awsclicachec                 C   s   | j dtdd d S )Nzsession-initializedZ&inject_assume_role_cred_provider_cache)Z	unique_id)register!inject_assume_role_provider_cache)Zevent_handlers r	   Dusr/lib/python3.10/site-packages/awscli/customizations/assumerole.pyregister_assume_role_provider   s   
r   c                 K   sZ   z|  d}W n ty   td Y d S w |d}tt|_|d}tt|_d S )NZcredential_providerz}ProfileNotFound caught when trying to inject assume-role cred provider cache.  Not configuring JSONFileCache for assume-role.zassume-rolezassume-role-with-web-identity)Zget_componentr   LOGdebugget_providerr   	CACHE_DIRr   )ZsessionkwargsZ
cred_chainZassume_role_providerZweb_identity_providerr	   r	   r
   r      s   


r   )osloggingZbotocore.exceptionsr   Zbotocore.credentialsr   	getLogger__name__r   path
expanduserjoinr   r   r   r	   r	   r	   r
   <module>   s    
