KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21585/root/usr/lib64/python2.4/distutils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21585/root/usr/lib64/python2.4/distutils/archive_util.pyc
mς
‚=5Dc@sψdZdZdkZdklZdklZdklZdk	l
Z
dddd	„Zddd
„Zhdedgd
f<dedgdf<dedgdf<dedgdf<degdf<Zd„Zddddd„ZdS(sodistutils.archive_util

Utility functions for creating archive files (tarballs, zip files,
that sort of thing).s8$Id: archive_util.py 37828 2004-11-10 22:23:15Z loewis $N(sDistutilsExecError(sspawn(smkpath(slogtgzipic	Cshdd<dd<dd<}hddg<ddg<ddg<}|dj	o ||iƒjo
td	‚n|d
}tt	i
i|ƒd|ƒdd
||g}t|d|ƒ|o2t|g|||gd|ƒ|||Sn|SdS(sήCreate a (possibly compressed) tar file from all the files under
    'base_dir'.  'compress' must be "gzip" (the default), "compress",
    "bzip2", or None.  Both "tar" and the compression utility named by
    'compress' must be on the default program search path, so this is
    probably Unix-specific.  The output tar file will be named 'base_dir' +
    ".tar", possibly plus the appropriate compression extension (".gz",
    ".bz2" or ".Z").  Return the output filename.
    Rs.gztbzip2s.bz2tcompresss.Zs-f9s-fs=bad value for 'compress': must be None, 'gzip', or 'compress's.tartdry_runttars-cfN(tcompress_exttcompress_flagsRtNonetkeyst
ValueErrort	base_nametarchive_nametmkpathtostpathtdirnameRtbase_dirtcmdtspawn(	R
RRtverboseRRRRR((t./usr/lib64/python2.4/distutils/archive_util.pytmake_tarballs	!* 


c	Cs y
dk}Wntj
o
d}nX|d}ttii|ƒd|ƒ|djo^|o
d}nd}y td|||gd|ƒWqtj
otd|‚qXnctid||ƒd	„}|p?|i|d
d|iƒ}tii|||ƒ|iƒn|S(sqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    Ns.zipRs-rs-rqtzipskunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilitys#creating '%s' and adding '%s' to itcCsnxg|D]_}tiitii||ƒƒ}tii|ƒo%|i	||ƒt
id|ƒqqWdS(Nsadding '%s'(tnamestnameR
RtnormpathtjoinRtisfiletztwritetlogtinfo(RRRRR((Rtvisitbs!twtcompression(tzipfiletImportErrorRR
tzip_filenameRR
RRRRt
zipoptionsRRtDistutilsExecErrorRRR tZipFiletZIP_DEFLATEDRtwalktclose(	R
RRRRR#R&R R%((Rtmake_zipfile<s2



	
	tgztarRsgzip'ed tar-filetbztarRsbzip2'ed tar-filetztarscompressed tar fileRsuncompressed tar fileRsZIP filecCs1x*|D]}ti|ƒp|SqqWdSdS(N(tformatstformattARCHIVE_FORMATSthas_keyR(R0R1((Rtcheck_archive_formats}s
c
Cs*tiƒ}|dj	o>tid|ƒtii|ƒ}|pti|ƒqWn|djo
ti
}nhd|<}yt|}Wn tj
otd|‚nX|d}
x"|dD]\}}	|	||<qΖWt|
||f|ƒ}|dj	o!tid|ƒti|ƒn|S(stCreate an archive file (eg. zip or tar).  'base_name' is the name
    of the file to create, minus any format-specific extension; 'format'
    is the archive format: one of "zip", "tar", "ztar", or "gztar".
    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.
    schanging into '%s'Rsunknown archive format '%s'iischanging back to '%s'N(R
tgetcwdtsave_cwdtroot_dirRRtdebugRtabspathR
RtchdirRtcurdirtkwargsR2R1tformat_infotKeyErrorR	tfunctargtvaltapplytfilename(
R
R1R7RRRR=R@RCRAR?R<R6((Rtmake_archive„s.




(scompresssgzip(scompresssbzip2(scompressscompress(scompressN(t__doc__t__revision__R
tdistutils.errorsR'tdistutils.spawnRtdistutils.dir_utilRt	distutilsRRR,RR2R4RD(RR2RFR'RRR4R,RRDR
((Rt?s	



,9l	

Anon7 - 2021