| Current Path : /usr/lib/python3/dist-packages/uaclient/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/uaclient/__pycache__/pip.cpython-38.pyc |
U
8�-d� � @ s$ d dl Z d dlmZ dZdd� ZdS )� N)�ConfigParserz
/etc/pip.confc C st t � }|�| � tj�t�rPt � }ttd��}|�|� W 5 Q R X |�|� |}ttd��}|� |� W 5 Q R X 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
�r�wN)
r Z read_dict�os�path�exists�PIP_CONFIG_FILE�openZ read_file�update�write)Zpip_config_dictZnew_conf_parserZexisting_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