KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/site-packages/rhpl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/rhpl/exception.pyc
m
gCc@sSdZdkZdkZdklZdfdYZhaddZdZdZ	ddddd	Zd
adZ
d
adZd
adZdddZdddZedjodZdZdkZdkZdZdZeddeedZdfdYZyeieidddddg\ZZxeD]\ZZedjp
edjo
dZqZnedjp
ed jo
dZqZned!jp
ed"joeei dqZqZWWn0eiefj
oeei dnXeddeeeei dnd#Z!dS($sNModule for a userfriendly exception handling

Example code:

import sys

from rhpl.exception import action, error, exitcode, installExceptionHandler

installExceptionHandler("test", "1.0", gui=0, debug=0)

def exception_function():
    action("Trying to divide by zero")

    try:
        local_var_1 = 1
        local_var_2 = 0
        # test exception raised to show the effect
        local_var_3 = local_var_1 / local_var_2
    except:
        error("Does not seem to work!? :-)")
        exitcode(15)
        raise

if __name__ == '__main__':
    exception_function()
    sys.exit(0)

N(t_t__ExceptionWindowcBs#tZdZdZdZRS(NcCsdk}|itdd|i}
|
itdd|
itdd|
i|id|
id|i	d}|i||i
}|i||idt|id	t|i}|i|i|i||i|i|i|it}	|	idtd
|}|i|}|it |	i!|t |
i"i!|t|
i"i!|	t |
i"id|
i"i#d|
i$dd
|
i%|i&|
i'd}|
i)|
|_+|i+i,|_-|i+i.dS(NsException Occurredt_Debugis
_Save to fileiiiteditabletcursor_visiblesAn unhandled exception has occurred.  This is most likely a bug.  Please save the crash dump and file a detailed bug report against %s at https://bugzilla.redhat.com/bugzillaiii,(/tgtktDialogRtNonetDIALOG_MODALtwint
add_buttont
STOCK_QUITtset_border_widtht
TextBuffertbuffertset_textttexttTextViewttextboxt
set_buffertset_propertytFalsetScrolledWindowtswtset_shadow_typet	SHADOW_INtaddt
set_policytPOLICY_AUTOMATICtHBoxthboxtcomponent_namettxttLabeltinfot
set_line_wraptTruet
pack_starttvboxtset_spacingtset_size_requesttset_positiontWIN_POS_CENTERtget_childrentcontentstshow_alltselftwindowtruntrctdestroy(R.RRR"R R,RRRRR	R((t4/usr/lib64/python2.4/site-packages/rhpl/exception.pyt__init__8sB	






	cCs
||_dS(N(tbuttonR.R1(R.tdialogR5((R3tquit`scCsL|idjodSn|idjodSn|idjodSndS(Niii(R.R1(R.((R3tgetrccs(t__name__t
__module__R4R7R8(((R3R7s	(	icCsdk}	ti|pdt|<n|iddS|iiidp|iiido|id|fdSn|id|ii	d|d}x4|iiD]#\}}t||	ijo|id||fd	}
xn|D]f}|
p|id
nd}
t||	ijot|||d	q|id|fqW|id
qt||	ijo|id||fd	}
x|iD]\}}|
p|id
nd}
t||	ijo|id|fn|id|ft||	ijot|||d	q|id|fqW|idqt||	ijo/|id||ft|||d	q|id|||fqWdS(NsAlready dumped
t__str__t__repr__s%s
s!%s instance, containing members:
t is%s%s: [is, is%ss]
s%s%s: {s'%s': s%s: s}
s%s%s: s	%s%s: %s
(ttypest
__dumpHashthas_keytinstanceRtfdtwritet	__class__t__dict__R9tleveltpadtitemstkeytvaluettypetListTypetfirsttitemtInstanceTypet__dumpClasstDictTypetktvt
StringType(RARBRFRIRNRRRJRSRGR>RM((R3RPqsX	
,
c	Csdkl}||}|i||}x|io
|i}q/W|i	}|idy;x4|iiD]#\}}|id||fqpWWnnXdS(N(sPicklers%
Local variables in innermost frame:
s%s: %s
(tcPickletPicklertouttpRCRttbttracettb_nextttb_frametframetf_localsRHRIRJ(	RWRRYRZR]RJRXRIRV((R3t__dumpExceptions


	
cCs"dk}t||}|iS(N(RRRtnameR	R8(ttitleRR`RR	((R3t__exceptionWindows	c	Cs;dk}|djo
|i}n|i||i|iB||i|}|djoOt||i
o|i|dqt||io|i|qn|djo5|it||io|iddqn|o!|i|i|i|n|i|i|i}|i|S(Nii(Rtmessage_typeRt
MESSAGE_ERRORt
MessageDialogt
parent_dialogRtDIALOG_DESTROY_WITH_PARENTt
BUTTONS_OKtmessageR6twidgett
isinstancetCListt
select_rowtpagetNotebooktset_current_paget
broken_widgett
grab_focustEntryt
select_regionR)tWIN_POS_CENTER_ON_PARENTtset_transient_forR*R0tretR2(	RiRfRcRjRnRqRRwR6((R3t__generic_error_dialogs.	

	
		



tcCs
|adS(s=Describe what you want to do actually.
    what - string
    N(twhatt__action_str(Rz((R3tactionscCs
|adS(sIDescribe what went wrong with a userfriendly text.
    what - string
    N(Rzt__error_str(Rz((R3terrorsi
cCst|adS(spThe exitcode, with which the exception handling routine should call
    sys.exit().
    num - int(exitcode)
    N(tinttnumt
__exitcode(R((R3texitcodesicsdt_dS(s
    Install the exception handling function.
    
    progname - the name of the application
    version  - the version of the application
    gui      - display a gtk dialog (0,1) to show the error message
    debug    - show the full traceback (with "Save to file" in GUI)    
    cst|||fS(N(thandleExceptionRKRJRYtprognametversiontguitdebug(RKRJRY(RRRR(R3t<lambda>sN(tsyst
excepthook(RRRR((RRRRR3tinstallExceptionHandlerscCs|\}}}|p`|ptdttfGHn0dk}td|ttf}t|dt
itnt
it
_dk}dk}dkl}dk}|i|||}|i|dd}t|o|t|d}n|i||}|od|}n|o|d|}n|d	}|oNt|d
jo;g}
|
i!|d
 |i"i#|d|
d<|
}n|i$}d}x5|D]-}|t(|d
7}|i)t(|qW|t(|i*d d|7}||d7}|d7}|||d7}|}x|i,o
|i,}q8W|i-}	|d7}y8x1|	i/i0D] \}}|d||f7}qvWWnnX|p|GHt
itndk}|pt|dt
itnxt2td||}|GH|djoC|o<dk4}dk5}|i6||i7|i8|i9q|pt
itq|i:tdd|i;|i<|i=|i>|i?f}|iA|i?|iB}||i?jo|iC}
|iE|
p
|
djo
d}
ny*tF|
d}|iH||iIWn*tJj
ottd|
dqXttd|
dddt
itq|iEqqWt
itdS(s
    The exception handling function.

    progname - the name of the application
    version  - the version of the application
    gui      - display a gtk dialog (0,1) to show the error message
    debug    - show the full traceback (with "Save to file" in GUI)
    s
Error: %s: %sNs
%s

%s:
%s(s
joinfieldstlimitisComponent: %s
sVersion: %s
sSummary: TBiiRyt:iR=s
s%
Local variables in innermost frame:
s%s: %s
sException OccurredsSpecify a file to save the dumps	/tmp/dumptwsFailed to write to file %s.sGThe application's state has been successfully
written to the file '%s'.RcR"(KRKRJRYRRRR{R}RRRRxRRtexitRt__excepthook__Rtos.pathtostmd5tstringt
joinfieldst	tracebacktformat_exceptiontlistt
extract_tbttblasttlentformat_exception_onlytextxtRtlltextendtpathtbasenametnewtmtntexttttstrtupdatet	hexdigestRZR[R\R]R^RHRIRbR1tpdbtsignaltpost_mortemtkilltgetpidtSIGKILLtFileChooserDialogtFILE_CHOOSER_ACTION_SAVEtSTOCK_CANCELtRESPONSE_CANCELt
STOCK_OPENtRESPONSE_OKtdtset_default_responseR0tget_filenametfileR2topenRWRCtclosetIOError(t.0RRRRRKRJRYRR]RRWRRRRR1RRRZRRIRRRRRRRR((R3Rs	
		
	


"

	
	
		
	!




t__main__cCsItdyd}d}||}WntdtdnXdS(NsTrying to divide by zeroiisDoes not seem to work!? :-)i(R|tlocal_var_1tlocal_var_2tlocal_var_3R~R(RRR((R3t__exception_functions


cCsdtidGHdS(Ns%s [-dgh] [--debug] [--gui] [--help]
    -d, --debug
        Show the whole backtrace
        
    -g, --gui
        Display a gtk error dialog

    -h, --help
        Display this messagei(Rtargv(((R3t__usagesttests1.0tBadUsagecBstZRS(N(R9R:(((R3RstdghRthelpRs-ds--debugs-gs--guis-hs--helps Harald Hoyer <harald@redhat.com>("t__doc__RRtrhpl.translateRRR?RPR_RbRRxR{R|R}R~RRRRR9RRtgetoptRRRRtoptstargstopttvalRt
__author__(RRxRRRR_RRRRRRRRRPRbRRRR~R|RRR((R3t?/s^
85		 			~
	
			

Anon7 - 2021