관리-도구
편집 파일: clconfpars.cpython-311.pyc
� \�Dg�( � �V � d dl Z d dlZd dlZd dlZd dlZd dlmZ G d� de� � Z G d� de� � Z dZ dd �Zd Zde de fd �Zd d�Zi Zd!d�Zd"d�Z ej dej ej z ej z � � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z edg d�� � Zd� Z de de fd�Z!dS )#� N)� namedtuplec � � e Zd Zd� ZdS )�WebConfigParsingErrorc � � || _ d S �N��message��selfr s �s/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/clconfpars.py�__init__zWebConfigParsingError.__init__ � � ������ N��__name__� __module__�__qualname__r � r r r r �# � � � � � �� � � � r r c � � e Zd Zd� ZdS )�WebConfigMissingc � � || _ d S r r r s r r zWebConfigMissing.__init__ r r Nr r r r r r r r r �asectionFc �& � t j dd d�� � }|rt |_ |rbt | d� � 5 }|� � � � t j � � d� � }d d d � � n# 1 swxY w Y n>t | dd�� � 5 }|� � � }d d d � � n# 1 swxY w Y |� d t � d �|z | �� � t |� t �� � � � S ) NTF)�allow_no_value� interpolation�strict�rb�replace�r�utf-8��encoding�[z] )�source)�section) �configparser�ConfigParser�str�optionxform�open�read�decode�locale�getpreferredencoding�read_string�SECHEAD�dict�items)�path�case_sensitive�ignore_bad_encoding�config�f�raws r �loadr: s� � � � &�d�59�.3�5� 5� 5�F� � !� ���� � �$�� � � L���&�&�(�(�/�/�&�"=�"?�"?��K�K�C� L� L� L� L� L� L� L� L� L� L� L���� L� L� L� L�� �$��g� .� .� .� �!��&�&�(�(�C� � � � � � � � � � � ���� � � � � ���'�7�'�'�'�#�-�d��;�;�;�����W��-�-�.�.�.s# �:A>�>B�B�B=�=C�C)�'�"�val�returnc � � | � t � � r$| � t � � r | dd� S | S )zW Strips single or double quote char only if the quote present from both sides. � ���)� startswith�_QUOTES�endswith)r= s r �$_strip_escape_quotes_of_config_valuerE 0 s>