Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/cloudinit/distros/parsers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/cloudinit/distros/parsers/__pycache__/hostname.cpython-310.pyc
o

}��f�	�@s*ddlmZddlmZGdd�d�ZdS)�)�StringIO)�chop_commentc@s@eZdZdd�Zdd�Zdd�Zedd��Zd	d
�Zdd�Z	d
S)�HostnameConfcCs||_d|_dS�N)�_text�	_contents)�self�text�r
�D/usr/lib/python3/dist-packages/cloudinit/distros/parsers/hostname.py�__init__s
zHostnameConf.__init__cCs |jdur|�|j�|_dSdSr)r�_parser)rr
r
r�parses
�zHostnameConf.parsecCs�|��t�}|jD]1\}}|dkr|�d|d�q
|dkr*|�d|d�q
|dkr;|\}}|�d||f�q
|��}|�d�sI|d7}|S)N�blankz%s
r�all_comment�hostnamez%s%s
�
)rrr�write�getvalue�endswith)r�contents�	line_type�
componentsr�tailr
r
r�__str__s�
zHostnameConf.__str__cCs0|��|jD]\}}|dkr|dSqdS)Nrr)rr)rrrr
r
rr's�zHostnameConf.hostnamecCsh|��}|sdS|��d}|jD]\}}|dkr!t|�|d<d}q|s2|j�dt|�dgf�dSdS)NFrrT�)�striprr�str�append)r�
your_hostname�replacedrrr
r
r�set_hostname/s��zHostnameConf.set_hostnamecCs�g}t�}|��D]5}t|���s|�d|gf�q	t|��d�\}}t|�s0|�d|gf�q	|�d||gf�|�|�q	t|�dkrKtd|��|S)Nr�#rr�zMultiple hostnames (%s) found!)�set�
splitlines�lenrrr�add�IOError)rr�entries�hostnames_found�line�headrr
r
rr
<szHostnameConf._parseN)
�__name__�
__module__�__qualname__rrr�propertyrr!r
r
r
r
rr
s

rN)�ior�cloudinit.distros.parsersrrr
r
r
r�<module>s

Spamworldpro Mini