File: //opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/__pycache__/clconfpars.cpython-311.pyc
�
��J�E��� �> � d dl Z d dlZd dlZd dlmZ d dlZ G d� de� � Z G d� de� � ZdZ dd �Z
d
Zdedefd
�Z
dd�Zi Zdd�Zd d�Z ej dej ej z ej z � � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z edg d�� � Zd� ZdS )!� N)�
namedtuplec � � e Zd Zd� ZdS )�WebConfigParsingErrorc � � || _ d S �N��message��selfr s ��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/cloudlinux/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 | d� � 5 }|� � � }d d d � � n# 1 swxY w Y |� dt � d�|z | � � � t |� t �
� � � � S )NTF)�allow_no_value�
interpolation�strict�rb�replace�r�[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 �loadr7 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�� �$��_�_� ���&�&�(�(�C� � � � � � � � � � � ���� � � � �
���'�7�'�'�'�#�-�d��;�;�;�����W��-�-�.�.�.s# �:A>�>B�B�B;�;B?�B?)�'�"�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_valuerB / s>