shell bypass 403

Cubjrnet7 Shell


name : clean.cpython-39.opt-1.pyc
a

�!cn�@s�ddlmZddlmZddlmZddlmZmZddlm	Z	ddlZ
ddlZ
ddlZ
ddl
Z
ddlZ
ddlZddlZddlZddlZe�d�Zgd�d	gd
gdggd�d
�Zdd�Zdd�Zdd�Zdd�ZGdd�dej�ZdS)�)�absolute_import)�unicode_literals)�commands)�_�P_)�miscN�dnf)�metadata�dbcache�expire-cache�packagesr
r)r	rr
)r	rr
r�allccsNt�|�D]>\}}}tj�||�}|D] }tj�||�}tj�|�Vq&q
dS)z:Traverse dirpath recursively and yield relative filenames.N)�os�walk�path�relpath�join�normpath)�dirpath�root�dirs�files�base�fr�r�:/usr/lib/python3.9/site-packages/dnf/cli/commands/clean.py�_tree1s
rcs�fdd�|D�S)z5Yield those filenames that match any of the patterns.c3s(|] }�D]}t�||�r
|Vq
qdS�N��re�match)�.0r�p��patternsrr�	<genexpr><�z_filter.<locals>.<genexpr>r)rr$rr#r�_filter:sr'cCsHd}|D]:}tj�||�}t�tjjtd�|�t	�
|�|d7}q|S)z(Remove the given filenames from dirpath.rzRemoving file %s�)rrr�logger�logr�loggingZDDEBUGrrZunlink_f)rr�countrrrrr�_clean?s

r-cs0tjjd��fdd�|D�}tdd�|D��S)z:Return the repo IDs that have some cached metadata around.r	c3s|]}t��|�VqdSrr)r!r�Zmetapatrrr%Mr&z _cached_repos.<locals>.<genexpr>css|]}|r|�d�VqdS)ZrepoidN)�group)r!�mrrrr%Nr&)r�repo�CACHE_FILES�set)r�matchesrr.r�
_cached_reposJsr5c@s0eZdZdZdZed�Zedd��Zdd�Z	dS)	�CleanCommandzSA class containing methods needed by the cli to execute the
    clean command.
    )Zcleanzremove cached datacCs|jddt��td�d�dS)N�type�+zMetadata type to clean)�nargs�choices�help)�add_argument�_CACHE_TYPES�keysr)�parserrrr�
set_argparserYs�zCleanCommand.set_argparserc
Cs�|jjj}tj�|d�}tj�|d�}tj�|jjjd�}�z<|�� |���|��t	dd�|j
jD��}tt
|��}t�tdd�|���d|vr�t|�}|jjj�|�|�d�t�td��dd	�|D�}t|t||��}	t�td
d|	�|	�Wd�Wd�Wd�WdS1�s,0YWd�n1�sL0YWd�n1�sl0YWq:tjj�y�}
z@|jjj�s�td�|
j}t�|�t� d
�n|
�WYd}
~
q:d}
~
00q:dS)NTcss |]}t|D]
}|VqqdSr)r=)r!�c�trrrr%gr&z#CleanCommand.run.<locals>.<genexpr>zCleaning data: � rzCache was expiredcSsg|]}tjj|�qSr)rr1r2)r!rBrrr�
<listcomp>qr&z$CleanCommand.run.<locals>.<listcomp>z%d file removedz%d files removedz*Waiting for process with pid %d to finish.�)!rZconf�cachedirr�lockZbuild_metadata_lockZbuild_download_lockZbuild_rpmdb_lockZ
persistdirr3Zoptsr7�listrr)�debugrrr5Z_repo_persistorZexpired_to_add�update�remove�infor-r'r�
exceptionsZ	LockErrorZexit_on_lock�pid�time�sleep)�selfrFZmd_lockZ
download_lockZ
rpmdb_lock�typesrZexpiredr$r,�e�msgrrr�run_s0

�
zCleanCommand.runN)
�__name__�
__module__�__qualname__�__doc__�aliasesrZsummary�staticmethodr@rUrrrrr6Qs
r6)Z
__future__rrZdnf.clirZdnf.i18nrrZdnf.yumrrZdnf.exceptionsZdnf.lockZdnf.loggingZdnf.repor+rrrOZ	getLoggerr)r=rr'r-r5ZCommandr6rrrr�<module>s2
�		

© 2025 Cubjrnet7