%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/cloudinit/distros/parsers/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/cloudinit/distros/parsers/__pycache__/hostname.cpython-312.pyc |
� ���f� � �0 � d dl mZ d dlmZ G d� d� Zy)� )�StringIO)�chop_commentc �: � e Zd Zd� Zd� Zd� Zed� � Zd� Zd� Z y)�HostnameConfc � � || _ d | _ y �N)�_text� _contents)�self�texts �D/usr/lib/python3/dist-packages/cloudinit/distros/parsers/hostname.py�__init__zHostnameConf.__init__ s � ��� ���� c �^ � | j �!| j | j � | _ y y r )r �_parser )r s r �parsezHostnameConf.parse s% � ��>�>�!�!�[�[����4�D�N� "r c �d � | j � t � }| j D ]` \ }}|dk( r|j d|d z � �#|dk( r|j d|d z � �@|dk( s�F|\ }}|j |�|�d�� �b |j � }|j d� s|dz }|S )N�blankz%s r �all_comment�hostname� )r r r �write�getvalue�endswith)r �contents� line_type� componentsr �tails r �__str__zHostnameConf.__str__ s� � �� � ���:��%)�^�^� <�!�I�z��G�#����v��A��7�8��m�+����v��A��7�8��j�(�#-� ��4����8�T�:�;� <� �$�$�&��� � ��&����H��r c �d � | j � | j D ] \ }}|dk( s�|d c S y )Nr r )r r )r r r s r r zHostnameConf.hostname'