HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3.9/site-packages/sos/cleaner/preppers/__pycache__/hostname.cpython-39.pyc
a

\��h��@s ddlmZGdd�de�ZdS)�)�
SoSPrepperc@seZdZdZdZdd�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Cs:g}d}|jrd}n
|jrd}|�|�}|r�|dkr�|�d�}t|�dkrl|�|d�|jd�|d�t|�dkr�d�|d	d��}|�|�	��|�|�	��|�d
�}|�
�D]b}|�d�s�d|vr�q�|��dd�}	|	D]4}
t|
�d��dk�r|jd�|
�q�|�|
�q�q�|jj
D]}|�|��q$|S)Nrzsos_commands/host/hostname_-fz"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_fileZcontentrZ
top_domainZ_hosts�lineZhostln�host�domain�r�A/usr/lib/python3.9/site-packages/sos/cleaner/preppers/hostname.py�_get_items_for_hostnames8


z'HostnamePrepper._get_items_for_hostnameN)�__name__�
__module__�__qualname__�__doc__�namerrrrrrsrN)Zsos.cleaner.preppersrrrrrr�<module>s