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 :  /lib/python2.7/site-packages/redhat_support_tool/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyc
�
��Tc@s�ddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlZddlZddljjZddlZd	Zd
Zejd�Zdefd
��YZdS(i����(tdeque(tfnmatch(tOption(tcommon(t_(tlist_extracted_vmlinuxes(tInteractivePlugint
DisplayOptionNs!Nigel Jones <nigjones@redhat.com>s%Keith Robertson <kroberts@redhat.com>s)redhat_support_tool.plugins.rmkerneldebugtRemKernelDebugscBs�eZdZed�Zed�ZdZed��Z	ed��Z
ed��Zed��Zd�Z
d�Zd	�Zd
�Zd�Zd�Zdd
�Zdd�Zdd�ZRS(t
rmkerneldebugsb%s of %s vmlinux images displayed. Type 'm' to see more, or 'r' to start from the beginning again.s"No more vmlinux images to display.cCs
td�S(s�
        The usage statement that will be printed by OptionParser.

        Example:
            - %prog -c CASENUMBER [options] <comment text here>
        Important: %prog is a OptionParser built-in.  Use it!
        s$%prog [--noprompt] <kerneldebugname>(R(tcls((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyt	get_usage.s	cCstd�|jS(s�
        The description statement that will be printed by OptionParser.

        Example:
            - 'Use the '%s' command to add a comment to a case.'             % cls.plugin_name
        sIUse the '%s' command to remove currently downloaded debug vmlinux images.(Rtplugin_name(R
((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytget_desc9s		cCstd�|jS(s
        The epilog string that will be printed by OptionParser.  Usually
        used to print an example of how to use the program.

        Example:
         Examples:
          - %s -c 12345678 Lorem ipsum dolor sit amet, consectetur adipisicing
          - %s -c 12345678
        s,Example:
  - %s kernel-debuginfo-2.6.18-128*(RR(R
((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyt
get_epilogFscCs.tdddddddtd�d	t�gS(
Ns-ns
--noprompttdesttnoprompttactiont
store_truethelps!Does not prompt for confirmation.tdefault(RRtFalse(R
((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytget_optionsUscCsCtj�s?td�|j}|js?|GHt|��q?ndS(Ns.ERROR: %s requires search string for deletion.(Rtis_interactiveRRt_linet	Exception(tselftmsg((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyt
validate_args\s	
	cCs
td�S(NsT
Type the number of a vmlinux image to delete or 'e' to return to the previous menu.(R(R((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytget_intro_textescCs
td�S(NsSelect an image: (R(R((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytget_prompt_textiscCs|jS(N(t
_submenu_opts(R((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytget_sub_menu_optionslscCs�tj�jdd�}t�|_g}t|�}g}tj�rg|jdkrg|j	d�n|jj
�}x>|D]6}x-|D]%}t||�r�|j	|�q�q�Wq}Wx'|D]}|jj	t|d��q�WdS(Ntoptiontkern_debug_dirtt*tinteractive_action(
tconfighelpertget_config_helpertgetRRRRRRtappendtsplitRR(Rt
kernelext_dirt
searchoptstkernelstresultstkerneltsearchR!((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytpostinitos 	


cCst|j�dkr$td�GHdSd}|td�7}x�|jD]z}||j7}y|jdd�GHWnItk
r�}tjtj	|�ddl
}|j|j�d�GHnXd}qDW|jdst
td	��}t|�j�j�d
krdSn|j|j�dS(NisNo images to remove.us'The following kernels will be removed:
sUTF-8treplacei����Rs@Are you sure you wish to remove the above vmlinux images (y/n)? ty(tlenRRtdisplay_texttencodeRtloggertlogtloggingtWARNINGtsystgetdefaultencodingt_optionst	raw_inputtstrtstriptlowert
_do_delete(RtdoctimageteR;tline((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pytnon_interactive_action�s(


cCs&|r|j|g�n	t��dS(N(RBR(Rtdisplay_option((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyR%�scCs^|j|�}t|�dkrOtd�GHx+|D]}td|�GHq3Wntd�GHdS(Nis7The following vmlinux images were unable to be removed:s - %ss-The vmlinux images were successfully removed.(t_delete_vmlinuxesR4R(Rt	deletequetresR/((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyRB�s
cCs�|st��ng}tj�jdd�}xr|D]j}tjj||j�}||kr7tjj|�r7yt	j
|�Wq�|j|j�q�Xq7q7W|S(NR!R"(RR&R'R(tostpathtjoinR5texiststshutiltrmtreeR)(RRJt
failedkernelsR+R/tkpath((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyRI�s	
N(t__name__t
__module__RRtpartial_entriestend_of_entriestNoneRtclassmethodRR
RRRRRR R1RGR%RBRI(((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyR$s"
							!
(tcollectionsRRtoptparseRtredhat_support_tool.helpersRt(redhat_support_tool.helpers.confighelperRt(redhat_support_tool.helpers.vmcorehelperRtredhat_support_tool.pluginsRRR9RLthelpersR&RPt
__author__t	getLoggerR7R(((sO/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/rem_kerneldebug.pyt<module>s

https://t.me/AnonymousX5 - 2025