%PDF- %PDF-
Direktori : /lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/ |
Current File : //lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/hostname_parser.cpython-312.pyc |
� i��d' � �: � d dl Z d dlmZ d dlmZ G d� de� Zy)� N)�SoSCleanerParser)�SoSHostnameMapc �2 � � e Zd ZdZdZdgZ� fd�Zd� Z� xZS )�SoSHostnameParserzHostname Parser�hostname_mapz5(((\b|_)[a-zA-Z0-9-\.]{1,200}\.[a-zA-Z]{1,63}(\b|_)))c �J �� t � | _ t t | � |� y )N)r �mapping�superr �__init__)�self�config� __class__s ��E/usr/lib/python3/dist-packages/sos/cleaner/parsers/hostname_parser.pyr zSoSHostnameParser.__init__ s �� �%�'��� ���/��7� 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! �� ��D�!�L�@��N�8�r r )r �sos.cleaner.parsersr �!sos.cleaner.mappings.hostname_mapr r � r r �<module>r) s �� � 0� <��(� r