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/parsers/__pycache__/hostname_parser.cpython-39.pyc
a

\��hM�@s4ddlZddlmZddlmZGdd�de�ZdS)�N)�SoSCleanerParser)�SoSHostnameMapcs6eZdZdZdZdgZgf�fdd�	Zdd�Z�ZS)�SoSHostnameParserzHostname ParserZhostname_mapz5(((\b|_)[a-zA-Z0-9-\.]{1,200}\.[a-zA-Z]{1,63}(\b|_)))cst|�|_t��||�dS)N)r�mapping�super�__init__)�selfZconfigZworkdirZskip_cleaning_files��	__class__��G/usr/lib/python3.9/site-packages/sos/cleaner/parsers/hostname_parser.pyrs
zSoSHostnameParser.__init__cCsfd}|jD] }t�||tj�r
||fSq
|�|�\}}||7}|jr^|�|�\}}||7}||fS)aThis will be called for every line in every file we process, so that
        every parser has a chance to scrub everything.

        We are overriding parent method since we need to swap ordering of
        _parse_line_with_compiled_regexes and _parse_line calls.
        r)Zskip_line_patterns�re�match�IZ_parse_lineZcompile_regexesZ!_parse_line_with_compiled_regexes)r�line�countZskip_pattern�_countZ_rcountrrr�
parse_lines
zSoSHostnameParser.parse_line)	�__name__�
__module__�__qualname__�nameZmap_file_keyZregex_patternsrr�
__classcell__rrr	rrs�r)r
Zsos.cleaner.parsersrZ!sos.cleaner.mappings.hostname_maprrrrrr�<module>s