/usr/lib/python3/dist-packages/sos/cleaner/preppers/__pycache__
Edit: /usr/lib/python3/dist-packages/sos/cleaner/preppers/__pycache__/hostname.cpython-310.pyc (1642B)
o
G%@iØ ã @ 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 s6 g }d}|j r
d}n|jrd}| |¡}|rS|dkrS| d¡}t|ƒdkr6| |d ¡ | jd |d ¡ t|ƒdkrLd |d d … ¡}| | ¡ ¡ | | ¡ ¡ | d
¡}|
¡ D ]0}| d¡sgd|v rhq\| ¡ dd … } | D ]}
t|
d¡ƒdkr†| jd |
¡ qr| |
¡ qrq\| jj
D ]}| |¡ q‘|S )Nr zsos_commands/host/hostname_-fz"data/insights_commands/hostname_-fÚ localhostÚ.é r é éþÿÿÿz etc/hostsú#)Úis_sosÚis_insightsÚget_file_contentÚsplitÚlenÚappendÚregex_itemsÚaddÚjoinÚstripÚ
splitlinesÚ
startswithÚoptsÚdomains)ÚselfÚarchiveÚitemsÚ_fileÚcontentr Ú
top_domainÚ_hostsÚlineÚhostlnÚhostÚdomain© r$ ú?/usr/lib/python3/dist-packages/sos/cleaner/preppers/hostname.pyÚ_get_items_for_hostname s:
üz'HostnamePrepper._get_items_for_hostnameN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Únamer&