a G%@i @s`ddlZddlZddlmZGdddeZGdddeZGdddeZGd d d eZdS) N)SoSObfuscationArchivec@s$eZdZdZdZdZeddZdS)SoSReportArchivezThis is the class representing an sos report, or in other words the type the archive the SoS project natively generates reportzsos report archivecCs.zt|od|vWSty(YdS0dS)N sosreport-Ftarfile is_tarfile Exceptionclsarc_pathr }tj||}d|vr t|r |t ||j |j |j q |S)NT)quietr) extractZextracted_pathrrrjoinrrappendrZtmpdirZkeep_binary_filesZtreat_certificates)self_pathZarchivesfnameZarc_namer r rget_nested_archivesAs  z'SoSCollectorArchive.get_nested_archivesN) rrrrrrZ is_nestedrrr&r r r rr0s rc@s$eZdZdZdZdZeddZdS)SoSCollectorDirectoryz{The archive class representing the temp directory used by ``sos collect`` when ``--clean`` is used during runtime. Z collect_dirzsos collect directorycCs.tj|r*t|D]}d|vrdSqdS)Nzsos-collector-TFr)r r r%r r rrVs  z#SoSCollectorDirectory.check_is_typeNrr r r rr'Ns r')rrZsos.cleaner.archivesrrrrr'r r r r s