File: //usr/lib/python3/dist-packages/uaclient/__pycache__/pip.cpython-310.pyc
o
0xvc� � @ s$ d dl Z d dlmZ dZdd� ZdS )� N)�ConfigParserz
/etc/pip.confc C s� t � }|�| � tj�t�r2t � }ttd��
}|�|� W d � n1 s&w Y |�|� |}ttd��}|� |� W d � dS 1 sHw Y dS )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_conf s
�
"�r )r �configparserr r r r r r r �<module> s