HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/lvemanager/__pycache__/config_parser.cpython-37.pyc
B

�%Ud�@s^ddlmZddlmZddlmZddlmZddlmZddl	m
Z
Gdd�dej�Zd	S)
�)�print_function)�division)�absolute_import)�configparser)�StringIO)�
basestringc@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�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__'
    cOs8|�dd�}tjj|f|�|�d|_|�|p0d�dS)N�default_section�
__config__)�pop�ConfigParser�RawConfigParser�__init__�_default_section�set_default_section)�self�args�kwargsr	�r�I/opt/alt/python37/lib/python3.7/site-packages/lvemanager/config_parser.pyrsz SectionlessConfigParser.__init__cCs|jS)N)r)rrrr�get_default_sectionsz+SectionlessConfigParser.get_default_sectioncCsh|�|�y|�|j�}|�|j�Wntjk
r<Yn"Xx|D]\}}|�|||�qDW||_dS)N)�add_section�itemsr�remove_sectionr�NoSectionError�set)r�section�default_section_items�key�valuerrrr"s
z+SectionlessConfigParser.set_default_sectionc
Csjt|t�r|g}g}xP|D]H}y"t|��}|�|�WdQRXWntk
rVwYqX|�|�qW|S)N)�
isinstancer�open�readfp�IOError�append)r�	filenames�read_ok�filename�fprrr�read1s


zSectionlessConfigParser.readcOslt�}y|j|_Wntk
r&YnX|�d|jd�|�|���|�dd�tjj	||f|�|�S)N�[z]
r)
r�name�AttributeError�writerr)�seekrr
r")rr(rr�streamrrrr"AszSectionlessConfigParser.readfpcCs�yJ|�|j�}|�|j�x"|D]\}}|�d�||��q W|�d�Wntjk
r`YnXtj�||�|�|j�x |D]\}}|�	|j||�q�WdS)Nz{0}={1}
�
)
rrrr-�formatrrr
rr)rr(rrrrrrr-PszSectionlessConfigParser.writeN)
�__name__�
__module__�__qualname__�__doc__rrrr)r"r-rrrrrsrN)
�
__future__rrr�future.movesrr�iorZ
past.builtinsrr
rrrrr�<module>	s