관리-도구
편집 파일: hostname.cpython-39.pyc
a ����-�_g�����������������������@���s ���d�dl�mZ�G�dd��de�ZdS�)�����)� SoSPrepperc�������������������@���s���e�Zd�ZdZdZdd��ZdS�)�HostnamePrepperaw�� Prepper for providing domain and hostname information to the hostname mapping. The items from hostname sources are handled manually via the _get_items method, rather than passing the file directly, as the parser does not know what hostnames or domains to match on initially. This will also populate the regex_items list with local short names. �hostnamec�����������������C���s:��g�}d}|j�rd}n |jrd}|�|�}|r�|dkr�|�d�}t|�dkrl|�|d���|�jd��|d���t|�dkr�d�|d d����}|�|� ����|�|� ����|�d �}|� ��D�]b}|�d�s�d|v�r�q�|���dd���} | D�]4} t| �d��dk�r|�jd��| ��q�|�| ��q�q�|�jj D�]}|�|���q$|S�)Nr���zsos_commands/host/hostnamez"data/insights_commands/hostname_-fZ localhost�.����r����������z etc/hosts�#)Zis_sosZis_insightsZget_file_content�split�len�appendZregex_items�add�join�strip� splitlines� startswithZopts�domains)�self�archive�itemsZ_fileZcontentr���Z top_domainZ_hosts�lineZhostln�host�domain��r����A/usr/lib/python3.9/site-packages/sos/cleaner/preppers/hostname.py�_get_items_for_hostname���s8���� z'HostnamePrepper._get_items_for_hostnameN)�__name__� __module__�__qualname__�__doc__�namer���r���r���r���r���r������s���r���N)Zsos.cleaner.preppersr���r���r���r���r���r����<module>���s���