B 1&§3%k9ã@s¼ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z dd„Z gZ dd„Z dd„Z dd „Zd d „Zd d „Zddd„Zddd„ZGdd„dƒZeƒjZddd„ZdS)éNcCsdS)Na' --> --> ©rrrú(/opt/alt/python37/lib/python3.7/cgitb.pyÚreset#srcCs|rd|dSdSdS)NzzÚr)ÚtextrrrÚsmall.s rcCs|rd|dSdSdS)Nzz rr)rrrrÚstrong4s rcCs|rd|dSdSdS)Nzzrr)rrrrÚgrey:s r cCs†||krd||fS||jkr,d|j|fSd|jkr~|jd}t|ƒtiƒkrf||kr~d||fSnt||ƒr~dt||ƒfSdtfS)NÚlocalÚglobalÚ __builtins__Úbuiltin)Ú f_globalsÚtypeÚhasattrÚgetattrÚ __UNDEF__)ÚnameÚframeÚlocalsÚbuiltinsrrrÚlookup@s     rcCsÔgdddtf\}}}}}x¶t |¡D]¨\}} } } } |tjkr>P|tjkr¦| tjkr¦|dkr„|tk r¤t|| tƒ}| || ||f¡qÈt | ||ƒ\} }| | | |f¡n"| dkrÀ||d7}|}nd\}}| }q$W|S)NrÚ.)Nr) rÚtokenizeÚgenerate_tokensÚNEWLINEÚNAMEÚkeywordÚkwlistrÚappendr)ÚreaderrrÚvarsZ lasttokenÚparentÚprefixÚvalueZttypeÚtokenÚstartÚendÚlineÚwhererrrÚscanvarsPs"   r*éc" sš|\}}}t|tƒr|j}dtj ¡ddtj}t t ¡¡}dt j   dt t j   t|ƒ¡ƒdd|d|¡d }d td ƒd }g} t ||¡} xJ| D]@\} ‰} } }}ˆrÚtj ˆ¡‰d ˆt j   ˆ¡f}nd‰}t | ¡\}}}}d}| dkr.dt t j   | ¡ƒtj||||dd„d}i‰| gf‡‡fdd„ }t|| |ƒ}dd||fg}|dk r| |}xŽ|D]†}tddtt|ƒƒt|ƒƒd}|ˆkrÐd|t j  |¡f}| d|¡n&d|t j  |¡f}| dt|ƒ¡|d7}qzWig}}x¤|D]œ\}}} ||kr,qd||<| tk r |dkrZd |t |ƒ}n*|d!krnt |ƒ}n|t | d"¡d#ƒ}| d$|t j  | ¡f¡n| |d%¡qW| dttd& |¡ƒƒ¡|  d'd( |¡¡q¢Wd)t t j   t|ƒ¡ƒt j   t|ƒ¡fg}!xNt|ƒD]B}|dd…d*kr6qt j  t ||ƒ¡} |! d+||| f¡qW|d | ¡d |!¡d,t j   d t! "|||¡¡¡S)-NzPython rz: zz%sz#ffffffz#6622aaz
z‹

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

zz     z  z%sú?rzin cSsdtj |¡S)Nú=)ÚpydocÚhtmlÚrepr)r$rrrÚózhtml..)Ú formatvaluec s4dˆ|d<zt ˆ|d¡S|dd7<XdS)Nér)Ú linecacheÚgetline)Úlnum)ÚfileÚ highlightrrr „s zhtml..readerz+%s%s %sz z r+z=>%s%sz&%sz  %s%sz%sr4)r r z %s r réÿÿÿÿz %s = %sz undefinedz, zF %s
Ú z

%s: %sÚ_z
%s%s = %szî )#Ú isinstancerÚ__name__ÚsysÚversionÚsplitÚ executableÚtimeÚctimer.r/ÚheadingrÚescapeÚstrrÚinspectÚgetinnerframesÚosÚpathÚabspathÚ getargvaluesÚformatargvaluesr*ÚlenZ preformatrr rr0ÚjoinÚdirrÚ tracebackÚformat_exception)"ÚeinfoÚcontextÚetypeÚevalueÚetbÚpyverÚdateÚheadÚindentÚframesÚrecordsrr7ÚfuncÚlinesÚindexÚlinkÚargsÚvarargsÚvarkwrÚcallr r!ÚrowsÚir(ÚnumÚdoneÚdumprr)r$Ú exceptionr)r8r9rr/es|  0       $        r/c sŽ|\}}}t|tƒr|j}dtj ¡ddtj}t t ¡¡}dt |ƒ||fd}g}t   ||¡} x | D]–\} ‰} } } }ˆr”t j  ˆ¡p–d‰t  | ¡\}}}}d}| dkrÖd| t j||||d d „d }i‰| gf‡‡fd d „ }t|| |ƒ}dˆ|fg}|dk rL| |}x0| D](}d|}| || ¡¡|d7}q Wig}}xŽ|D]†\}}}||krtq\d||<|tk rÒ|dkršd|}n|dkr¶|| d¡d}| d|tj |¡f¡n| |d¡q\W| d |¡¡| dd |¡¡qrWdt |ƒt |ƒfg}x8t|ƒD],}tj t||ƒ¡}| dd||f¡q.W|d |¡d |¡dd t |||¡¡S)NzPython rz: z %s %s %s z… A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. r,rzin cSsdtj |¡S)Nr-)r.rr0)r$rrrr1Ôr2ztext..)r3c s4dˆ|d<zt ˆ|d¡S|dd7<XdS)Nr4r)r5r6)r7)r8r9rrr ×s ztext..readerz %s %sz%5d r4r zglobal r rr:z%s = %sz undefinedr;z %s z%s: %sz %s%s = %sz zc The above is a description of an error in a Python program. Here is the original traceback: %s )r=rr>r?r@rArBrCrDrGrHrIrJrKrLrMrNr*rÚrstriprr.rr0rPrQrrRrS) rTrUrVrWrXrYrZr[r]r^rr7r_r`rarcrdrerrfr r!rgrhr(rirjrkrr)r$rlr)r8r9rr¿s^            rc@s(eZdZd dd„Zdd„Zd d d „ZdS) ÚHookr4Nr+r/cCs(||_||_||_|ptj|_||_dS)N)ÚdisplayÚlogdirrUr?Ústdoutr8Úformat)ÚselfrorprUr8rrrrrÚ__init__s  z Hook.__init__cCs| |||f¡dS)N)Úhandle)rsrVrWrXrrrÚ__call__ sz Hook.__call__c Csz|p t ¡}|jdkr$|j tƒ¡|jdkr2tp4t}d}y|||jƒ}Wn d  t j |Ž¡}d}YnX|j rª|r˜t j |¡}|j d|d¡q¶|j |d¡n |j d¡|jdk rZd d g|jdk}tj||jd \}}y.t |d ¡}| |¡WdQRXd |} Wnd|} YnX|jdkrJ|j d| ¡n|j | d¡y|j ¡Wn YnXdS)Nr/FrTz

z
r;z*

A problem occurred in a Python script. z.txtz.html)ÚsuffixrQÚwz*%s contains the description of this error.z*Tried to save traceback to %s, but failed.z

%s

)r?Úexc_inforrr8Úwriterr/rrUrPrRrSror.rFrpÚtempfileZmkstemprJÚfdopenÚflush) rsÚinfoÚ formatterZplainÚdocrwÚfdrKr8Úmsgrrrrus@        z Hook.handle)r4Nr+Nr/)N)r>Ú __module__Ú __qualname__rtrvrurrrrrns rnr4cCst||||dt_dS)N)rorprUrr)rnr?Ú excepthook)rorprUrrrrrÚenable8sr†)r+)r+)r4Nr+r/)rHrr5rJr.r?r{rCrrRrrrrr rr*r/rrnruZhandlerr†rrrrÚs*  Z A7