Current File : //usr/lib/python3/dist-packages/sos/cleaner/archives/__pycache__/sos.cpython-312.pyc |
�
-�_g7 � �x � d dl Z d dlZd dlmZ G d� de� Z G d� de� Z G d� de� Z G d � d
e� Zy)� N)�SoSObfuscationArchivec �( � e Zd ZdZdZdZed� � Zy)�SoSReportArchivez�This is the class representing an sos report, or in other words the
type the archive the SoS project natively generates
�reportzsos report archivec �X � t j |� xr d|v S # t $ r Y yw xY w)N�
sosreport-F��tarfile�
is_tarfile� Exception��cls�arc_paths �:/usr/lib/python3/dist-packages/sos/cleaner/archives/sos.py�
check_is_typezSoSReportArchive.check_is_type s4 � � ��%�%�h�/�L�L�H�4L�L��� �� �� � � )�)N��__name__�
__module__�__qualname__�__doc__� type_name�description�classmethodr � � r r r s% � �� �I�&�K��� �r r c �( � e Zd ZdZdZdZed� � Zy)�SoSReportDirectoryz�This is the archive class representing a build directory, or in other
words what `sos report --clean` will end up using for in-line obfuscation
�
report_dirzsos report directoryc �p � t j j |� rdt j |� v S y)N�sos_logsF��os�path�isdir�listdirr
s r r z SoSReportDirectory.check_is_type) s) � �
�7�7�=�=��"�����H�!5�5�5�r Nr r r r r r ! s% � �� �I�(�K��� �r r c �2 � e Zd ZdZdZdZdZed� � Zd� Z y)�SoSCollectorArchivez�Archive class representing the tarball created by ``sos collect``. It
will not provide prep files on its own, however it will provide a list
of SoSReportArchive's which will then be used to prep the parsers
�collectzsos collect tarballTc �X � t j |� xr d|v S # t $ r Y yw xY w)Nzsos-collectFr r
s r r z!SoSCollectorArchive.check_is_type: s4 � � ��&�&�x�0�N�]�h�5N�O��� �� �r c �: � | j d�� | j }g }t j |� D ]b }t j j ||� }d|v s�(t
j |� s�>|j t || j � � �d |S )NT)�quietr )�extract�extracted_pathr# r&