
    ~ g                     &    S SK Jr   " S S\5      rg)    )
SoSPrepperc                   "    \ rS rSrSrSrS rSrg)HostnamePrepper   a[  
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                    / nSnUR                   (       a  SnOUR                  (       a  SnUR                  U5      nU(       a  US:w  a  UR                  S5      n[	        U5      S:  a5  UR                  US   5        U R                  S   R                  US   5        [	        U5      S:  a3  SR                  US	S  5      nUR                  UR                  5       5        UR                  UR                  5       5        UR                  S
5      nUR                  5        H  nUR                  S5      (       d  SU;   a  M!  UR                  5       SS  n	U	 HR  n
[	        U
R                  S5      5      S:X  a   U R                  S   R                  U
5        MA  UR                  U
5        MT     M     U R                  R                   H  nUR                  U5        M     U$ )Nr   zsos_commands/host/hostnamez"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domains               ?/usr/lib/python3/dist-packages/sos/cleaner/preppers/hostname.py_get_items_for_hostname'HostnamePrepper._get_items_for_hostname   s   >>0E  8E**51w+-mmC(G7|aWQZ(  ,00'!*>7|a !XXgbcl3
Z--/0LL)))+6%%'Ds##{d':ZZ\!"%Ftzz#'1,$$Z044T:LL&	 	 ( ii''FLL  (      N)__name__
__module____qualname____firstlineno____doc__namer)   __static_attributes__r,   r+   r(   r   r      s    	 D#r+   r   N)sos.cleaner.preppersr   r   r,   r+   r(   <module>r5      s    ,1j 1r+   