-=[ Mr. Bumblebee ]=-
_Indonesia_

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

ó
ÚµQc@@sâdZddlmZddlZddlZddlZddlZddlZddlmZddl	Z	ddl	m
Z
mZmZm
Z
mZd„Zd„Zd„Zd	„Zd
„Zd„Zd„Zd
„ZdS(s
Handling and reporting crashes.

A crash is an exception propagated up almost to the top level of Bazaar.

If we have apport <https://launchpad.net/apport/>, we store a report of the
crash using apport into its /var/crash spool directory, from where the user
can either manually send it to Launchpad.  In some cases (at least Ubuntu
development releases), Apport may pop up a window asking if they want
to send it.

Without apport, we just write a crash report to stderr and the user can report
this manually if the wish.

We never send crash data across the network without user opt-in.

In principle apport can run on any platform though as of Feb 2010 there seem
to be some portability bugs.

To force this off in bzr turn set APPORT_DISABLE in the environment or 
-Dno_apport.
i(tabsolute_importN(tStringIO(tconfigtdebugtosutilstpluginttracecC@s©dtjks$tjjddƒr1t||ƒSyt||ƒrGdSWnQtk
rn}t	j
d|ƒn.tk
r›}t	j
d|ƒt	jƒnXt||ƒS(Nt	no_apporttAPPORT_DISABLEs.couldn't find apport bug-reporting library: %ss,bzr: failed to report crash using apport: %r(
Rtdebug_flagstostenvirontgettNonetreport_bug_legacytreport_bug_to_apporttImportErrorRtmuttert	Exceptiontlog_exception_quietly(texc_infotstderrte((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyt
report_bug@s
c@sëtj|ˆƒˆjdƒddl‰‡‡fd†}|dtjtjtjƒt	j	ddƒfƒ|dtj
ƒ|ˆjd	tj
ƒd
ddd
ƒdƒ|dtjƒtjƒtjjdƒfƒˆjdƒdS(s4Report a bug by just printing a message to the user.s
iNc@s*ˆjˆj|ddddƒdƒdS(NtwidthiNtsubsequent_indents    s
(twritetfill(tl(terr_filettextwrap(s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyt
print_wrappedWssbzr %s on python %s (%s)
taliasedisarguments: %r
s	plugins: RiNRs    s"encoding: %r, fsenc: %r, lang: %r
tLANGsþ
*** Bazaar has encountered an internal error.  This probably indicates a
    bug in Bazaar.  You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.
(Rtprint_exceptionRRtbzrlibt__version__t_format_version_tupletsystversion_infotplatformtargvRRtformat_concise_plugin_listRtget_user_encodingtgetfilesystemencodingR
RR(RRR((RRs0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyRRs(
	cC@sYddl}t|ƒ}|dkr4|jdƒn!tj||ƒ|jd|ƒ|S(s…Report a bug to apport for optional automatic filing.

    :returns: The name of the crash file, or None if we didn't write one.
    iNs9
apport is set to ignore crashes in this version of bzr.
sŠ
You can report this problem to Bazaar's developers by running
    apport-bug %s
if a bug-reporting window does not automatically appear.
(tapportt_write_apport_report_to_fileR
RRR"(RRR-tcrash_filename((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyRrs	c
C@s½ddl}ddlm}|\}}}|ƒ}|jƒ|d=|jƒd|d<d|d<tjtjƒ|d<t	j
|d<t	jtjƒ|d	<t
j
d
dƒ|d<tjƒ|d
<tjƒ|d<tjjddƒ|d<tƒ|d<tƒ|d<tjtjƒ|d<d|d<d|d<d|d<tƒ}|j|||d|ƒ|jƒ|d<t|ƒ|jƒ|jƒrdStƒ\}}	|j |	ƒ|	j!ƒ|SdS(Ni(tReporttProcMapstbzrt
SourcePackagetPackagetCommandLinet
BzrVersiont
PythonVersionR itPlatformtUserEncodingtFileSystemEncodingR!tCtLocalet
BzrPluginstPythonLoadedModulest
BzrDebugFlagstCrashDbtfilet	Traceback("t	tracebackt
apport.reportR0t
add_proc_infot
add_user_infotpprinttpformatR&R)R#R$R%R'R(RR+R,R
RRt_format_plugin_listt_format_module_listRR	RR"tgetvaluet_attach_log_tailt	anonymizet
check_ignoredR
t_open_crash_fileRtclose(
RRCR0texc_typet
exc_objecttexc_tbtprttb_filetcrash_file_namet
crash_file((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyR.“sB	









	



cC@syttjƒdƒ}Wn*ttfk
rE}t|ƒ|d<dSXz'|jƒ}dj|dƒ|d<Wd|jƒXdS(Ntrtt
BzrLogTailtiØÿÿÿ(	topenRt_get_bzr_log_filenametIOErrortOSErrortreprt	readlinestjoinRP(RTtbzr_logRtlines((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyRLáscC@sÃtjƒ}tj|ƒs1tj|ddƒntjdtjƒƒ}t	j
dkrad}ndtjƒ}tj|d||fƒ}|tj
tj|tjtjBtjBdƒdƒfS(	Ntmodei€s%Y-%m-%dT%H:%Mtwin32RZs.%dsbzr%s.%s.crashtwb(Rt	crash_dirRtisdirR
tmakedirsttimetstrftimetgmtimeR&R(tgetuidtpathjointfdopenR[tO_WRONLYtO_CREATtO_EXCL(Rgtdate_stringt	user_parttfilename((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyROîs"	
		cC@sdjtjdtƒƒS(NRZt
show_paths(RaRtdescribe_pluginstTrue(((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyRI	scC@stjtjƒS(N(RGRHR&tmodules(((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyRJ
s(t__doc__t
__future__RR
R(RGR&RjRR#RRRRRRRRR.RLRORIRJ(((s0/usr/lib/python2.7/dist-packages/bzrlib/crash.pyt<module>%s"(			 	!	N	
		

Copyright © 2017 || Recoded By Mr.Bumblebee