0x1949 Team - FAZEMRX - MANAGER
Edit File: sys_conf.cpython-310.pyc
o ���f? � @ sf d dl Z d dlZd dlmZ d dlZdZe �de �e �d�e �d�gZdd� ZG d d � d ej �Z dS )� N)�StringIOz[a-zA-Z_]+[a-zA-Z0-9_]*z\$z\$[0-9#\?\-@\*]z\$\{.+\}c C s t D ] }|�| �r dS qdS )NTF)�SHELL_VAR_REGEXES�search)�text�r� r �D/usr/lib/python3/dist-packages/cloudinit/distros/parsers/sys_conf.py�_contains_shell_variable$ s �r c @ s2 e Zd ZdZdd� Zdd� Zddd�Zd d � ZdS ) �SysConfa A configobj.ConfigObj subclass specialised for sysconfig files. :param contents: The sysconfig file to parse, in a format accepted by ``configobj.ConfigObj.__init__`` (i.e. "a filename, file like object, or list of lines"). c C s t jj| |ddd� d S )NFT)� interpolation�write_empty_values)� configobj� ConfigObj�__init__)�self�contentsr r r r 4 s �zSysConf.__init__c C sJ | � � }t� }t|ttf�r|� d�|�� |�� S |� t|�� |�� S )N� )�writer � isinstance�list�tuple�join�str�getvalue)r r �out_contentsr r r �__str__9 s �zSysConf.__str__Fc s� t |t�std| ��t|�dkrdS d }|d dv r.|d dv r.t|�dkr-� fdd�}n0|�� �d �r=|�� �d �r=n!t�d|�r^t |�r[t�d|�rT� fd d�}n � fdd�}nt j}|sb|S ||�S )NzValue "%s" is not a stringr � )�"�'���� c � � � | �| S �N��_get_single_quote��x�r r r �<lambda>K � z SysConf._quote.<locals>.<lambda>z$(�)z [\t\r\n ]z[\n\"']c r! r"