????

Your IP : 3.14.141.163


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/__pycache__/clconfig.cpython-311.pyc

�

�j�e���B�ddlmZddlmZddlmZddlZdZd�Zd�ZdS)�)�absolute_import)�division)�print_functionNz/var/cpanel/cpanel.configc�@�	t|��}|���}n#ttf$rYdSwxYw|D]]}|�d|z��rC|���|����d��dcS�^dS)z�
    Get param from config file
    :param path: Path to config file
    :type path: str
    :param param: Key for param in config file
    :type param: str
    F�%s=�=�N)�open�	readlines�OSError�IOError�
startswith�close�strip�split)�path�param�fd�data�lines     ��/builddir/build/BUILDROOT/alt-python27-cllib-3.3.15-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/clconfig.py�	get_paramrs����
�$�Z�Z���|�|�~�~�����W������u�u������0�0���?�?�5�5�=�)�)�	0��H�H�J�J�J��J�J�L�L�&�&�s�+�+�Q�/�/�/�/�	0��4s�#&�;�;c���|�d|�d�}tj�|��s?t|d��5}|�|��ddd��n#1swxYwYdSt|��5}|���}ddd��n#1swxYwYt
|��D]u\}}|�d|z��rX|||<t|d��5}|�d�|����ddd��n#1swxYwYdS�vt|d��5}|�|��ddd��dS#1swxYwYdS)a
    Replaces config file with path to config file with line param=value
    :param path: Path to config file
    :type path: str
    :param param: Key for param in config file
    :type key: str
    :param value: Value for param in config file
    :type value: str
    r�
�wNr��a)	�osr�existsr
�writer�	enumerater�join)rr�value�new_line�fr�irs        r�
replace_paramr'#sS��"�E�E�5�5�5�)�H�
�7�>�>�$����
�$��_�_�	��
�G�G�H����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	���	
�d����q��{�{�}�}���������������������T�?�?�����4��?�?�5�5�=�)�)�	��D��G��d�C���
'�A��������
�
�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'��F�F�		�
�d�C����A�	���������������������������sG�A�A�!A�6B�B�B�#)D�D	�D	�7E�E�!E)�
__future__rrrr�CPANEL_CONFIG_PATHrr'��r�<module>r,st��'�&�&�&�&�&�������%�%�%�%�%�%�	�	�	�	�0�����(����r+