HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/uaclient/__pycache__/pip.cpython-310.pyc
o

0xvc��@s$ddlZddlmZdZdd�ZdS)�N)�ConfigParserz
/etc/pip.confcCs�t�}|�|�tj�t�r2t�}ttd��
}|�|�Wd�n1s&wY|�|�|}ttd��}|�	|�Wd�dS1sHwYdS)z�
    Update pip.conf file on /etc/ with the required configurations
    for enabling a service.

    :param pip_config_dict:
        A dictionaty representing a valid pip config
    �rN�w)
r�	read_dict�os�path�exists�PIP_CONFIG_FILE�open�	read_file�update�write)�pip_config_dict�new_conf_parser�existing_conf_parser�f�r�./usr/lib/python3/dist-packages/uaclient/pip.py�update_pip_confs
�
"�r)r�configparserrr	rrrrr�<module>s