File: //lib/python3/dist-packages/sos/cleaner/parsers/__pycache__/mac_parser.cpython-310.pyc
o
([Qh�
� @ s@ d dl Z d dlmZ d dlmZ dZdZdZG dd� de�ZdS ) � N)�SoSCleanerParser)� SoSMacMapze((?<!([0-9a-fA-F\'\"]:)|::)([^:|-])?([0-9a-fA-F]{2}(:|-)){7}[0-9a-fA-F]{2}(\'|\")?(\/|\,|\-|\.|\s|$))z�((?<!(?:([.|^|\b]{5}\w|[.|^|\b]fe80:|fe80::)))(([0-9a-fA-F]{4}:){3}[0-9a-fA-F]{4})(?!\w))|((?<!\w)(([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{4})(?!\w))zW((?<!([0-9a-fA-F\'\"]:)|::)(([^:\-])?(([0-9a-fA-F]{2}([:\-\_])){5,6}([0-9a-fA-F]{2}))))c sT e Zd ZdZdZeeegZdZ dgZ
dZdZg f� fdd� Z
d d
� Zdd� Z� ZS )
�SoSMacParserz!Handles parsing for MAC addressesz
MAC Parser)z53:4f:53z534f:53zsos_commands/.*/modinfo.*�mac_mapFc s t � | _t� �||� d S )N)r �mapping�super�__init__)�self�config�skip_cleaning_files�� __class__� �@/usr/lib/python3/dist-packages/sos/cleaner/parsers/mac_parser.pyr 8 s zSoSMacParser.__init__c C sP |d dvr|dd� }|d dvs|d dvr$|dd� }|d dvs|� � S )z�Strips away leading and trailing non-alphanum characters from any
matched string to leave us with just the bare MAC addr
r �0123456789abcdefABCDEF� N���)�strip)r �matchr r r �reduce_mac_match<