o
    Û1j  ã                   @   s,   d dl mZ d dlmZ G dd„ deƒZdS )é    )ÚSoSCleanerParser)ÚSoSUsernameMapc                       s4   e Zd ZdZdZdZg f‡ fdd„	Zdd„ Z‡  ZS )ÚSoSUsernameParsera¹  Parser for obfuscating usernames within an sos report archive.

    Note that this parser does not rely on regex matching directly, like most
    other parsers do. Instead, usernames are discovered via scraping the
    collected output of lastlog. As such, we do not discover new usernames
    later on, and only usernames present in lastlog output will be obfuscated,
    and those passed via the --usernames option if one is provided.
    zUsername ParserÚusername_mapc                    s   t |ƒ| _tƒ  ||¡ d S )N)r   ÚmappingÚsuperÚ__init__)ÚselfÚconfigÚworkdirÚskip_cleaning_files©Ú	__class__© úE/usr/lib/python3/dist-packages/sos/cleaner/parsers/username_parser.pyr      s   
zSoSUsernameParser.__init__c                 C   s   |dfS )Nr   r   )r	   Úliner   r   r   Ú_parse_line    s   zSoSUsernameParser._parse_line)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚmap_file_keyr   r   Ú__classcell__r   r   r   r   r      s    	r   N)Úsos.cleaner.parsersr   Ú!sos.cleaner.mappings.username_mapr   r   r   r   r   r   Ú<module>   s   
