id8 xddlmZddlZddlZGddeZGddeZGddeZGd d eZy) )SoSObfuscationArchiveNc(eZdZdZdZdZedZy)SoSReportArchivezThis is the class representing an sos report, or in other words the type the archive the SoS project natively generates reportzsos report archivecX tj|xrd|vS#t$rYywxYw)N sosreport-Ftarfile is_tarfile Exceptionclsarc_paths :/usr/lib/python3/dist-packages/sos/cleaner/archives/sos.py check_is_typezSoSReportArchive.check_is_types4 %%h/LLH4L L    ))N__name__ __module__ __qualname____doc__ type_name description classmethodrrrrs%I&Krrc(eZdZdZdZdZedZy)SoSReportDirectoryzThis 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 directorycptjj|rdtj|vSy)Nsos_logsFospathisdirlistdirr s rrz SoSReportDirectory.check_is_type*s) 77== "H!55 5rNrrrrrr"s%I(Krrc2eZdZdZdZdZdZedZdZ y)SoSCollectorArchivezArchive 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 tarballTcX tj|xrd|vS#t$rYywxYw)Nz sos-collectFr r s rrz!SoSCollectorArchive.check_is_type;s4 &&x0N]h5N O  rc:|jd|j}g}tj|D]b}tjj ||}d|vs(t j|s>|jt||jd|S)NT)quietr) extractextracted_pathr#r&r$joinr r appendrtmpdir)self_patharchivesfnamearc_names rget_nested_archivesz'SoSCollectorArchive.get_nested_archivesBs 4  ##ZZ& IEww||E51Hu$););H)E 04;; GH IrN) rrrrrr is_nestedrrr7rrrr(r(1s/ I'KI rr(c(eZdZdZdZdZedZy)SoSCollectorDirectoryz{The archive class representing the temp directory used by ``sos collect`` when ``--clean`` is used during runtime. collect_dirzsos collect directoryctjj|r tj|D]}d|vsyy)Nzsos-collector-TFr")rrr5s rrz#SoSCollectorDirectory.check_is_typeUs: 77== "H- #u, rNrrrrr:r:Ms%I)Krr:)sos.cleaner.archivesrr#r rrr(r:rrrr>sD7  ,  ) /8/r