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/diagnose.pyc
�
��Tc@sddlmZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
mZddlmZddlmZdd	lZdd	lZdd	ljjZdd	ljjZdd	lZdd	lZd
ZdZejd�Zd
e
fd��YZd	S(i����(tdeque(tRequestErrortConnectionError(tEmptyValueErrort_(t	Constants(tLaunchHelper(tInteractivePlugintObjectDisplayOption(tKb(turlparseNs%Keith Robertson <kroberts@redhat.com>s&Spenser Shumaker <sshumake@redhat.com>s$redhat_support_tool.plugins.diagnosetDiagnosecBs�eZdZed�ZdZdZdZe	d��Z
e	d��Ze	d��Zd�Z
d�Zd�Zd�Zd	�Zd
�Zd�Zd�Zdd
�Zd�ZRS(tdiagnosesDiagnose a problemcCs
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!
        s9%prog <keywords, file, or directory containing log files>(R(tcls((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.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
        skUse the '%s' command to send a file, a directory containing files, or plain text to Shadowman for analysis.(Rtplugin_name(R
((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytget_desc9s		cCs&td�|j|j|j|jfS(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�Examples:
- %s /var/log/jbossas/rhevm-slimmed/boot.log
- %s /var/spool/abrt/ccpp-2012-09-28-09:53:26-4080
- %s /var/log/messages
- %s libvirt error code: 1, message: internal error HTTP response code 404
(RR(R
((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt
get_epilogFs	cCs
td�S(NsO
Type the number of the solution to view or 'e' to return to the previous menu.(R(tself((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytget_intro_textZscCs
td�S(NsSelect a Solution: (R(R((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytget_prompt_text^scCs|jS(N(t
_submenu_opts(R((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytget_sub_menu_optionsascCs�td�|j}|js�tj�r�g}y,td�GHxtrX|jt��q?WWq�tk
r�t	dj
|��j�jd�|_q�Xq�|GHt
|��ndS(Ns.ERROR: %s requires a file, directory, or text.s^Please provide the file, directory, or text to be analyzed: Ctrl-d on an empty line to submit:s
sutf-8(RRt_linetcommontis_interactivetTruetappendt	raw_inputtEOFErrortstrtjointstriptdecodet	Exception(Rtmsgt	userinput((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt_check_inputds	
		
cCs
||_dS(s�
        Allow insertion of a package object by launchhelper (when selecting
        from the list generated by list_kerneldebugs.py)
        N(R(Rtsymptom((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt
insert_objyscCs|j�dS(N(R%(R((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt
validate_args�scCs�t�|_i|_d}y�tj�}tjj|j	�sZ|j
j|j	�|_n*tjj
|j	�}|j
j|�|_t|j�dkr�|j�s�t��q�n	t��Wn�tk
r}td�t|�}|GHtjtj|��n�tk
rD}td�|j}|GHtjtj|��nvtk
r{td�}|GHtjtj|��n?tk
r�td�|j	}|GHtjtj|��nXdS(Nis	ERROR: %ss5Unable to connect to support services API. Reason: %ssZProblem connecting to the support services API.  Is the service accessible from this host?sUnable to find solutions to %s(RRt	_sectionstNonet	apihelpertget_apitostpathtisfileRtproblemstdiagnoseStrt_pAryt
expandusertdiagnoseFiletlent_parse_problemR"RRRtloggertlogtloggingtWARNINGRtreasonR(Rtapitreport_fileteveR#tre((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytpostinit�sD	
	


cCs�d}x7|jD],}|j|jkr||j|7}qqW|dkr�y|jdd�GHWq�tk
r�}tjtj	|�ddl
}|j|j�d�GHq�XndS(NusUTF-8treplacei����(Rtdisplay_texttALLR)tencodeR"R7R8R9R:tsystgetdefaultencoding(RtdoctoptteRE((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytnon_interactive_action�scCs�|j|jkrtd}x7|jD],}|j|jkr"||j|7}q"q"Wtj|jdd�dd�n"|j}tt	�}|j
|�dS(NusUTF-8RAtcmdsless -R(RBRCRR)tpydoct	pipepagerRDt
stored_objRR	trun(Rtdisplay_optionRGRHtsol_idtlh((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pytinteractive_action�s
	cCst�}d�}y�x�|jD]�}|j�}xv|D]n}t|�dkr`|j|�q8t}x'|D]}|||�rmt}PqmqmW|s8|j|�q8q8WqWd}x|D]�}d}t|j��}	t	j
j|	d�}
|ddtj
|j�f7}|dtj|
f7}|dtj|j�f7}|dtjtd	tj�tjf7}d
|
|j�f}t|d|
�}|jj|�||j|<q�WWnKtk
r}
td�}|GHtjtj|�tjtj|
�tSX|rtStS(
sF
        Use this for non-interactive display of results.aAry
        cSsHtjj|j��}tjj|j��}||kr@tStSdS(N(R-R.tbasenametget_uriRtFalse(tnewsoltoldsoltnewidtoldid((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt
comparison�s
iuis%-8s %-70s
s%s:s
%-8s %-70ss


%s%s%s

t-s[%7s] %sRSs'ERROR: problem parsing the attachments.(tsetR2tget_linkR5taddRVRR
RUR-R.RTRtTITLEt	get_valuetIDtURLtBOLDRtMAX_RULEtENDRRRR)R"RR7R8R9R:(Rt	solutionsR[tprobtlinkstlinkt	duplicatetliRGtparsedRQt
disp_opt_texttdisp_optRIR#((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyR6�sV		


	N(t__name__t
__module__RRRCR*RR)R2tclassmethodRRRRRRR%R'R(R@RJRSR6(((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyR's$
							)	
(tcollectionsRt(redhat_support_lib.infrastructure.errorsRRt(redhat_support_tool.helpers.confighelperRRt%redhat_support_tool.helpers.constantsRt(redhat_support_tool.helpers.launchhelperRtredhat_support_tool.pluginsRRtredhat_support_tool.plugins.kbR	R
R-RLt%redhat_support_tool.helpers.apihelperthelpersR+t"redhat_support_tool.helpers.commonRttempfileR9t
__author__t	getLoggerR7R(((sH/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/diagnose.pyt<module>s"

https://t.me/AnonymousX5 - 2025