HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/hostname_parser.cpython-310.pyc
o

i��d'�@s4ddlZddlmZddlmZGdd�de�ZdS)�N)�SoSCleanerParser)�SoSHostnameMapcs2eZdZdZdZdgZ�fdd�Zdd�Z�ZS)�SoSHostnameParserzHostname Parser�hostname_mapz5(((\b|_)[a-zA-Z0-9-\.]{1,200}\.[a-zA-Z]{1,63}(\b|_)))cst�|_tt|��|�dS)N)r�mapping�superr�__init__)�self�config��	__class__��E/usr/lib/python3/dist-packages/sos/cleaner/parsers/hostname_parser.pyrszSoSHostnameParser.__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)�skip_line_patterns�re�match�I�_parse_line�compile_regexes�!_parse_line_with_compiled_regexes)r	�line�count�skip_pattern�_count�_rcountr
r
r�
parse_lines
�zSoSHostnameParser.parse_line)	�__name__�
__module__�__qualname__�name�map_file_key�regex_patternsrr�
__classcell__r
r
rrrs�r)r�sos.cleaner.parsersr�!sos.cleaner.mappings.hostname_maprrr
r
r
r�<module>s