Viewing File: /usr/lib/python2.7/site-packages/sos/archive.pyo
Kjc @ s d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m
Z
m Z y d d l Z Wn e
k
r n Xd d l Z e j r e Z n d Z d Z d Z d Z d e f d YZ d
e f d YZ d e f d
YZ d S( iN( t Lock( t sos_get_command_outputt
is_executablet filet linkt nodet dirt Archivec B s e Z d Z e d Z e j d Z d Z e Z
e Z d Z
d Z d Z d Z d Z d Z d d
Z d d Z d
Z d Z d Z d Z d Z d Z d Z d Z d Z RS( s! Abstract base class for archives.c C s | j S( s6 Returns the archive class's name as a string.
( t __name__( t cls( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt archive_type* s t sost unsetc C s d | j | f S( Ns [archive:%s] %s( R
( t selft msg( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt _format_msg7 s c C s
| | _ d S( N( t _debug( R
t debug( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt set_debug: s c C s | j j | j | d S( N( t logt errorR ( R
R ( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt log_error= s c C s | j j | j | d S( N( R t warningR ( R
R ( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt log_warn@ s c C s | j j | j | d S( N( R t infoR ( R
R ( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt log_infoC s c C s* | j s
d S| j j | j | d S( N( R R R R ( R
R ( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt log_debugF s c C s
t d S( N( t NotImplementedError( R
t srct dest( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt add_fileN s t wc C s
t d S( N( R ( R
t contentR t mode( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt
add_stringQ s c C s
t d S( N( R ( R
R R ( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt
add_binaryT s c C s
t d S( N( R ( R
t sourcet link_name( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt add_linkW s c C s
t d S( N( R ( R
t path( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt add_dirZ s c C s
t d S( N( R ( R
R' R! t device( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt add_node] s c C s
t d S( s Return a temporary directory that clients of the archive may
use to write content to. The content of the path is guaranteed
to be included in the generated archive.N( R ( R
( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt get_tmp_dir` s c C s
t d S( s Return the maximum file name length this archive can support.
This is the lesser of the name length limit of the archive
format and any temporary file system based cache.N( R ( R
( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt name_maxf s c C s d S( sT Return a string representing the path to the temporary
archive. For archive classes that implement in-line handling
this will be the archive file itself. Archives that use a
directory based cache prior to packaging should return the
path to the temporary directory where the report content is
locatedN( ( R
( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt get_archive_pathl s c C s d S( s: Clean up any temporary resources used by an Archive class.N( ( R
( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt cleanupu s c C s | j d S( s Finalize an archive object via method. This may involve creating
An archive that is subsequently compressed or simply closing an
archive that supports in-line handling. If method is automatic then
the following methods are tried in order: xz, bz2 and gzipN( t close( R
t method( ( s/ /usr/lib/python2.7/site-packages/sos/archive.pyt finalizey s N( R t
__module__t __doc__t classmethodR
t loggingt getLoggerR t _namet FalseR R t
_path_lockR R R R R R t NoneR R"