HEX
Server: LiteSpeed
System: Linux server3ir.xdlhost.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: gmparts (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cloudlinux/venv/lib64/python3.11/site-packages/clcommon/__pycache__/clconfig.cpython-311.pyc
�

��Tj����ddlZdZd�Zd�ZdS)�Nz/var/cpanel/cpanel.configc�L�	t|d���5}|���}ddd��n#1swxYwYn#ttf$rYdSwxYw|D]I}|�|�d���r/|����d��dcS�JdS)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
    �utf-8��encodingNF�=�)�open�	readlines�OSError�IOError�
startswith�strip�split)�path�param�f�data�lines     ��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.41-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/clconfig.py�	get_paramr
s����
�$��
)�
)�
)�	!�Q��;�;�=�=�D�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!����W������u�u������0�0���?�?�e�;�;�;�'�'�	0��J�J�L�L�&�&�s�+�+�Q�/�/�/�/�	0��4s,�A�4�A�8�A�8�A�A�Ac��|�d|�d�}tj�|��s�tj|tjtjztjztjzd��}tj|dd���5}|�	|��ddd��n#1swxYwYdSt|d���5}|�
��}ddd��n#1swxYwYt|��D]�\}}|�|�d���r�|||<tj|tjtjztjztjzd��}tj|dd���5}|�	d�
|����ddd��n#1swxYwYdS��tj|tjtjztjztjzd��}tj|d	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�
i��wrrN��a)�osr�existsr	�O_WRONLY�O_CREAT�O_TRUNC�
O_NOFOLLOW�fdopen�writer
�	enumerater
�join�O_APPEND)	rr�value�new_line�fdrr�irs	         r�
replace_paramr+ s����#�#�%�#�#�#�H�
�7�>�>�$����
�W�T�2�;���3�b�j�@�2�=�P�RW�
X�
X��
�Y�r�3��
1�
1�
1�	�Q�
�G�G�H����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	���	
�d�W�	%�	%�	%����{�{�}�}���������������������T�?�?�����4��?�?�e�;�;�;�'�'�	��D��G����r�{�R�Z�7�"�*�D�r�}�T�V[�\�\�B���2�s�W�5�5�5�
'���������
�
�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'��F�F�	�
���r�{�R�Z�/�"�+�=��
�M�u�	U�	U�B�	��2�s�W�	-�	-�	-���	���������������������������sH�B(�(B,�/B,�C'�'C+�.C+�)F6�6F:	�=F:	�#I�I
�
I
)r�CPANEL_CONFIG_PATHrr+��r�<module>r/s>��
�	�	�	�0�����&����r.