HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/awscli/customizations/emr/__pycache__/configutils.cpython-36.pyc
3

�T_�	�@s�ddlZddlZddlmZddlmZddlmZeje�Z	dd�Z
dd�Zd	d
�Zdd�Z
d
d�Zdd�ZGdd�de�ZdS)�N)�ConfigFileWriter)�
EC2_ROLE_NAME)�
EMR_ROLE_NAMEcCs|j�jdi�S)N�emr)Zget_scoped_config�get)�session�r�!/usr/lib/python3.6/configutils.py�get_configssr
cCs|jd�}|dkrdS|S)N�profile�default)�get_config_variable)r�profile_namerrr	�get_current_profile_names
rcCs
t|d�S)N�.)�_get_profile_str)rrrr	�get_current_profile_var_name srcCs"|jd�}|dkrdSd||fS)Nrrzprofile%c%s)r
)rZ	separatorrrrr	r$s
rcCs t|�}d|ksd|krdSdS)N�instance_profile�service_roleTF)r
)rZparsed_configsrrr	�is_any_role_configured*srcCsBt|�rtjd�n*t|�}|jdt�|jdt�tjd�dS)NzJAt least one of the roles is already associated with your current profile rrz2Associated default roles with your current profile)r�LOG�debug�ConfigWriter�
update_configrr)rZ
config_writerrrr	�update_roles1src@seZdZdd�Zdd�ZdS)rcCs||_t|d�|_t�|_dS)N� )rr�sectionr�config_file_writer)�selfrrrr	�__init__>szConfigWriter.__init__cCs6tjj|jjd��}|j||id�}|jj||�dS)NZconfig_file)Z__section__r)�os�path�
expanduserrr
rrr)r�key�valueZconfig_filenameZupdated_configrrr	rCszConfigWriter.update_configN)�__name__�
__module__�__qualname__rrrrrr	r<sr)Zloggingr Z&awscli.customizations.configure.writerrZ#awscli.customizations.emr.constantsrrZ	getLoggerr%rr
rrrrr�objectrrrrr	�<module>
s