| Server IP : 162.144.4.212 / Your IP : 216.73.216.108 Web Server : Apache System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64 User : cozeellc ( 2980) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.9/site-packages/cloudinit/distros/parsers/__pycache__/ |
Upload File : |
a
'�Dg�
� @ s* d dl mZ d dlmZ G dd� d�ZdS )� )�StringIO)�chop_commentc @ sD e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dS )� HostsConfc C s || _ d | _d S �N)�_text� _contents)�self�text� r
�C/usr/lib/python3.9/site-packages/cloudinit/distros/parsers/hosts.py�__init__ s zHostsConf.__init__c C s | j d u r| �| j�| _ d S r )r �_parser )r r
r
r �parse s
zHostsConf.parsec C sV | � � g }| jD ]>\}}|dkr|\}}t|�r|d |kr|�|dd � � q|S )N�optionr � )r r �len�append)r �ip�options� line_type�
components�pieces�_tailr
r
r � get_entry s zHostsConf.get_entryc C sx | � � g }| jD ]Z\}}|dkr4|�||f� qq|\}}t|�rR|d |krRqt|�r|�|t|�f� q|| _d S )Nr r )r r r r �list)r r Z n_entriesr r r r r
r
r �del_entries"