AlkantarClanX12

Your IP : 3.145.85.74


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

�

�tg����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.16-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�|��sAt|dd���5}|�|��ddd��n#1swxYwYdSt|d���5}|���}ddd��n#1swxYwYt
|��D]w\}}|�|�d���rZ|||<t|dd���5}|�d�|����ddd��n#1swxYwYdS�xt|dd���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�
�wrrN��a)	�osr�existsr	�writer
�	enumerater
�join)rr�value�new_linerr�irs        r�
replace_paramr$ su���#�#�%�#�#�#�H�
�7�>�>�$����
�$��g�
.�
.�
.�	�!�
�G�G�H����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	���	
�d�W�	%�	%�	%����{�{�}�}���������������������T�?�?�����4��?�?�e�;�;�;�'�'�	��D��G��d�C�'�2�2�2�
'�a��������
�
�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'��F�F�		�
�d�C�'�	*�	*�	*��a�	���������������������������sG�A�A �#A �:B�B�"B�))D�D"	�%D"	�?E"�"E&�)E&)r�CPANEL_CONFIG_PATHrr$��r�<module>r(s>��
�	�	�	�0�����&����r'