관리-도구
편집 파일: config_parser.cpython-311.pyc
� %�4g � �t � d dl mZ d dl mZ d dl mZ d dlmZ d dlmZ d dl m Z G d� dej � � Zd S ) � )�print_function)�division)�absolute_import)�configparser)�StringIO)� basestringc �6 � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z dS ) �SectionlessConfigParserz� Extends ConfigParser to allow files without sections. This is done by wrapping read files and prepending them with a placeholder section, which defaults to '__config__' c � � |� dd � � }t j j | g|�R i |�� d | _ | � |pd� � d S )N�default_section� __config__)�pop�ConfigParser�RawConfigParser�__init__�_default_section�set_default_section)�self�args�kwargsr s �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/lvemanager/config_parser.pyr z SectionlessConfigParser.__init__ sa � � �*�*�%6��=�=���$�-�d�D�T�D�D�D�V�D�D�D� $���� � ��!@�L�A�A�A�A�A� c � � | j S �N)r )r s r �get_default_sectionz+SectionlessConfigParser.get_default_section s � ��$�$r c � � | � |� � | � | j � � }| � | j � � |D ]\ }}| � |||� � �n# t j $ r Y nw xY w|| _ d S r )�add_section�itemsr �remove_section�setr �NoSectionError)r �section�default_section_items�key�values r r z+SectionlessConfigParser.set_default_section"