Server : nginx/1.24.0 System : Linux ip-172-31-33-48 6.14.0-1011-aws #11~24.04.1-Ubuntu SMP Fri Aug 1 02:07:25 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE Directory : /lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/ |
Upload File : |
� -�_g= � �: � d dl Z d dlmZ d dlmZ G d� de� Zy)� N)�SoSCleanerParser)�SoSHostnameMapc �6 � � e Zd ZdZdZdgZg f� fd� Zd� Z� xZS )�SoSHostnameParserzHostname Parser�hostname_mapz5(((\b|_)[a-zA-Z0-9-\.]{1,200}\.[a-zA-Z]{1,63}(\b|_)))c �D �� t � | _ t �| � ||� y )N)r �mapping�super�__init__)�self�config�skip_cleaning_files� __class__s ��E/usr/lib/python3/dist-packages/sos/cleaner/parsers/hostname_parser.pyr zSoSHostnameParser.__init__ s �� �%�'��� ����!4�5� c � � d}| j D ]- }t j ||t j � s�)||fc S | j |� \ }}||z }| j r| j |� \ }}||z }||fS )a This 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�_rcounts r � parse_linezSoSHostnameParser.parse_line s� � � �� �3�3� #�L��x�x��d�B�D�D�1��U�{�"� #� �'�'��-���f� ������� �B�B�4�H�M�D�'��W��E��U�{�r ) �__name__� __module__�__qualname__�name�map_file_key�regex_patternsr r � __classcell__)r s @r r r s&