Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/apport_python_hook.pyc


Yc@sCdZddlZddlZdZdZdZdZdS(s:Python sys.excepthook hook to generate apport crash dumps.iNs/etc/default/apportcCsWddl}y2ttj}|jd||jdkSWntk
rRtSXdS(s4Return whether Apport should generate crash reports.iNs^\s*enabled\s*=\s*0\s*$(	tretopentCONFIGtreadtsearchtMtNonetIOErrortTrue(Rtconf((s6/usr/lib/python2.7/dist-packages/apport_python_hook.pytenableds 
cCsRz.|tfkrdSts#dSt|drK|jdkrKdSnyddlm}Wn!tk
rddlm}nXddl}ddl	}ddl
m}m}y2t
jjt
jjt
jtjd}WnLtttfk
r1yt
jdt
j}Wq2tk
r-dSXnXt
j|t
js[t
jj|r_dS||sodSddl}	|	jj}
|}|j |||d	||j!j"|
d
<|
j#|
j$||
d<ydtj|
d
<Wntk
rnX|
j%rdS|j&dd|}t
j'}
dt
j(j)dd||
f}d}t
jj*|r|	j+j,|r|t-|d}|dkrdSt
j.|qdSn|rt/||
d<nt
j0t
j-|t
j1t
j2Bt
j3Bdd}z|
j4|Wd|j5XWdtrMtj6|||nXdS(s1Catch an uncaught exception and make a traceback.Nt
get_dbus_names"org.freedesktop.DBus.Error.NoReplyi(tStringIO(tlikely_packagedtget_recent_crashesis/proc/%i/exetfilet	TracebacktExecutablePaths%rt
PythonArgst/t_s%s/%s.%i.crashtAPPORT_REPORT_DIRs
/var/crashitCrashCounteritw(7tKeyboardInterruptR
thasattrRt	cStringIORtImportErrortioRt	tracebacktapport.fileutilsR
Rtostpathtrealpathtjointgetcwdutsystargvt	TypeErrortAttributeErrort
IndexErrortreadlinktgetpidtOSErrortaccesstX_OKtisfilet
apport.reporttreporttReporttprint_exceptiontgetvaluetstript
add_proc_infot
add_user_infot
check_ignoredtsubtgetuidtenvirontgettexistst	fileutilstseen_reportRtunlinktstrtfdopentO_WRONLYtO_CREATtO_EXCLtwritetcloset__excepthook__(texc_typetexc_objtexc_tbRRRR
Rtbinarytapporttprttb_filetmangled_programtusertpr_filenamet
crash_countertreport_file((s6/usr/lib/python2.7/dist-packages/apport_python_hook.pytapport_excepthooksx
	
2
	)	



#cCs
tt_dS(sInstall the python apport hook.N(RTR$t
excepthook(((s6/usr/lib/python2.7/dist-packages/apport_python_hook.pytinstalls(t__doc__RR$RR
RTRV(((s6/usr/lib/python2.7/dist-packages/apport_python_hook.pyt<module>s		n