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¡ƒdkr|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_sosZ is_insightsZget_file_contentÚsplitÚlenÚappendZ regex_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__Únamerrrrrrs rN)Zsos.cleaner.preppersrrrrrrÚ s