????
Your IP : 18.218.79.20
3
�ft`s �@s`ddlmZddlmZddlmZddlmZddlZddl Z e j
d�ZGdd�dej�Z
dS) �)�absolute_import)�unicode_literals)�_)�commandsN�dnfc@sLeZdZdZdZed�jejj d�Z
edd��Zdd�Z
d d
�Zdd�Zd
S)�SwapCommandzNA class containing methods needed by the cli to execute the swap command.
�swapz=run an interactive {prog} mod for remove and install one spec)�progcCs,|jddtd�d�|jddtd�d�dS)N�remove_specZstorezThe specs that will be removed)�action�help�install_specz The specs that will be installed)�add_argumentr)�parser�r�/usr/lib/python3.6/swap.py�
set_argparser&s
zSwapCommand.set_argparsercCsH|jj}d|_d|_d|_d|_tj|j|j�tj |j|j
jg�dS)NT)�cli�demandsZsack_activationZavailable_reposZ resolvingZ root_userrZ_checkGPGKey�baseZ_checkEnabledRepo�optsr
)�selfrrrr� configure,szSwapCommand.configurecCs@|jjj|�}|dk r<||j�}|jjj|||g�|j�dS)N)rZcli_commands�getZ optparserZparse_command_args�run)rZcmd_str�specZcmd_cls�cmdrrr�_perform5s
zSwapCommand._performcCs$|jd|jj�|jd|jj�dS)N�removeZinstall)rrr
r
)rrrrr<szSwapCommand.runN)r)�__name__�
__module__�__qualname__�__doc__�aliasesr�formatr�utilZMAIN_PROG_UPPERZsummary�staticmethodrrrrrrrrrs r)Z
__future__rrZdnf.i18nrZdnf.clirZdnf.utilrZloggingZ getLoggerZloggerZCommandrrrrr�<module>s