ok
Direktori : /opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/clconfig.cpython-37.pyc |
B E!wd� � @ sD d dl mZ d dl mZ d dl mZ d dlZdZdd� Zdd � ZdS ) � )�absolute_import)�division)�print_functionNz/var/cpanel/cpanel.configc C sh yt | �}|�� }W n ttfk r, dS X x4|D ],}|�d| �r4|�� |�� �d�d S q4W 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 Fz%s=�=� N)�open� readlines�OSError�IOError� startswith�close�strip�split)�path�param�fd�data�line� r �B/opt/alt/python37/lib/python3.7/site-packages/clcommon/clconfig.py� get_param s r c C s� d||f }t j�| �s<t| d��}|�|� W dQ R X dS t| ��}|�� }W dQ R X xTt|�D ]H\}}|�d| �rb|||<