https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/utils/archive.pyc
�
r�\c@s
dZddlZddlZddlZddlZddlmZdefd��YZdefd��YZ	dd	�Z
d
efd��YZdefd
��YZ
de
fd��YZde
fd��YZied6ed6ed6ed6ed6ed6ZdS(s�
Based on "python-archive" -- http://pypi.python.org/pypi/python-archive/

Copyright (c) 2010 Gary Wilson Jr. <gary.wilson@gmail.com> and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
i����N(tsixtArchiveExceptioncBseZdZRS(s6
    Base exception class for all archive errors.
    (t__name__t
__module__t__doc__(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR stUnrecognizedArchiveFormatcBseZdZRS(sK
    Error raised when passed file is not a recognized archive format.
    (RRR(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR&stcCs&t|��}|j|�WdQXdS(se
    Unpack the tar or zip file at the specified path to the directory
    specified by to_path.
    N(tArchivetextract(tpathtto_pathtarchive((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR,sRcBsVeZdZd�Zed��Zd�Zd�Zdd�Zd�Z	d�Z
RS(	sM
    The external API class that encapsulates an archive implementation.
    cCs|j|�|�|_dS(N(t_archive_clst_archive(tselftfile((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyt__init__9scCs�d}t|tj�r!|}n-y
|j}Wntk
rMtd��nXtjj	|j
��\}}tj|�}|s�tjj	|�\}}tj|�}n|s�td|��n|S(Ns,File object not a recognized archive format.s(Path not a recognized archive format: %s(
tNonet
isinstanceRtstring_typestnametAttributeErrorRtosR	tsplitexttlowert
extension_maptget(Rtclstfilenametbasettail_exttext((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR<s"	


cCs|S(N((R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyt	__enter__QscCs|j�dS(N(tclose(Rtexc_typet	exc_valuet	traceback((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyt__exit__TsRcCs|jj|�dS(N(R
R(RR
((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyRWscCs|jj�dS(N(R
tlist(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR&ZscCs|jj�dS(N(R
R!(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR!]s(RRRRtstaticmethodRR R%RR&R!(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR5s				tBaseArchivecBs2eZdZd�Zd�Zd�Zd�ZRS(sI
    Base Archive class.  Implementations should inherit this class.
    cCs�t|�}|jd�jd�}d|krvd|krZ|jd�|jd�ksfd|krv|jdd�Sd|kr�|jdd�S|dfSdS(Nt/s\iR(tstrtlstriptfindtsplit(RR	((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pytsplit_leading_dires6cCs_d}xR|D]J}|j|�\}}|s2tS|dkrG|}q
||kr
tSq
WtS(s�
        Returns true if all the paths have the same leading path name
        (i.e., everything is in one subdirectory in an archive)
        N(RR.tFalsetTrue(Rtpathst
common_prefixR	tprefixtrest((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pythas_leading_dirps
	cCs
t�dS(N(tNotImplementedError(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR�scCs
t�dS(N(R6(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR&�s(RRRR.R5RR&(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR(as
			t
TarArchivecBs,eZd�Zd�Zd�Zd�ZRS(cCstj|�|_dS(N(ttarfiletopenR
(RR((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR�scOs|jj||�dS(N(R
R&(Rtargstkwargs((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR&�sc	Cs�g|jj�D]}|jdkr|^q}|j|�}xE|D]=}|j}|rr|j|�d}ntjj||�}|j�r�|r�tjj	|�r�tj
|�q�qGz�y|jj|�}Wn.tt
fk
r}d||j|fGHndXtjj|�}	|	rDtjj	|	�rDtj
|	�nt|d��}
tj||
�WdQXWd|r�|j�nXqGWdS(Ntpax_global_headeris/In the tar file %s the member %s is invalid: %stwb(R
t
getmembersRR5R.RR	tjointisdirtexiststmakedirstextractfiletKeyErrorRtdirnameR9tshutiltcopyfileobjR!(RR
tmembertmemberstleadingRRt	extractedtexcREtoutfile((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR�s0
	cCs|jj�dS(N(R
R!(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR!�s(RRRR&RR!(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR7�s			t
ZipArchivecBs,eZd�Zd�Zd�Zd�ZRS(cCstj|�|_dS(N(tzipfiletZipFileR
(RR((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR�scOs|jj||�dS(N(R
tprintdir(RR:R;((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR&�sc	Cs
|jj�}|j|�}x�|D]�}|jj|�}|rY|j|�d}ntjj||�}tjj|�}|r�tjj	|�r�tj
|�n|jd�r�tjj	|�stj
|�qq%t|d��}|j
|�WdQXq%WdS(NiR)s\R=(R)s\(R
tnamelistR5treadR.RR	R?RERARBtendswithR9twrite(	RR
RRRJRtdataRRERM((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR�s
cCs|jj�dS(N(R
R!(R((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyR!�s(RRRR&RR!(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyRN�s			s.tars.tar.bz2s.tar.gzs.tgzs.tz2s.zip(RRRFR8ROtdjango.utilsRt	ExceptionRRRtobjectRR(R7RNR(((s6/tmp/pip-install-XxeQeY/django/django/utils/archive.pyt<module>s&	,&+

https://t.me/AnonymousX5 - 2025