b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/cgitb.pyc
Size12.17 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:24
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sªdZdZdZddkZd�ZgZd�Zd�Zd�Zd �Z d
�Z
d d �Z d d
�Z ddd��YZ
e
�iZddd dd�ZdS(s�More comprehensive traceback formatting for Python scripts.

To enable this module, do:

import cgitb; cgitb.enable()

at the top of your script. The optional arguments to enable() are:

display - if true, tracebacks are displayed in the web browser
logdir - if set, tracebacks are written to files in this directory
context - number of lines of source code to show for each stack frame
format - 'text' or 'html' controls the output format

By default, tracebacks are displayed but not saved, the context is 5 lines
and the output format is 'html' (for backwards compatibility with the
original use of this module)

Alternatively, if you have caught an exception and want cgitb to display it
for you, call cgitb.handler(). The optional argument to handler() is a
3-item tuple (etype, evalue, etb) just like the value of sys.exc_info().
The default handler displays output as HTML.
s Ka-Ping Yees$Revision: 83564 $iÿÿÿÿNcCsdS(sAReturn a string that resets the CGI and browser to a known state.s'<!--: spam
Content-Type: text/html

<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>((((s/usr/lib64/python2.6/cgitb.pytresetscCs|o
d|dSdSdS(Ns<small>s</small>t((ttext((s/usr/lib64/python2.6/cgitb.pytsmall)s
cCs|o
d|dSdSdS(Ns<strong>s </strong>R((R((s/usr/lib64/python2.6/cgitb.pytstrong/s
cCs|o
d|dSdSdS(Ns<font color="#909090">s</font>R((R((s/usr/lib64/python2.6/cgitb.pytgrey5s
cCsÆ||jod||fS||ijod|i|fSd|ijon|id}t|�th�jo ||jod||fSq¼t||�odt||�fSndtfS(s9Find the value for a given name in the given environment.tlocaltglobalt __builtins__tbuiltinN(t f_globalsttypethasattrtgetattrtNonet __UNDEF__(tnametframetlocalstbuiltins((s/usr/lib64/python2.6/cgitb.pytlookup;s


cCsUddk}ddk}gdddtf\}}}}} x|i|�D]\}
} } }
}|
|ijoPn|
|ijo�| |ijo�|djoA|tj o0t|| t�} |i || || f�qqGt
| ||�\}} |i | || f�n2| djo||d7}| }n
d\}}| }qLW|S(sEScan one logical line of Python and look up values of variables used.iÿÿÿÿNRt.(NR( ttokenizetkeywordRRtgenerate_tokenstNEWLINEtNAMEtkwlistR
tappendR(treaderRRRRtvarst lasttokentparenttprefixtvaluetttypettokentstarttendtlinetwhere((s/usr/lib64/python2.6/cgitb.pytscanvarsKs&$ 

"

 
ic's7ddk}ddk}ddk}ddk}ddk�ddk}ddk�|\}}} t|�|ijo
|i }ndt
i i �ddt
i
}
|i|i��} d�iidt�iit|���dd |
d
| �d } d td
d�d}
g}|i| |�}xõ|D]í\}�}}}}�o2|ii���d��ii��f}n d�}|i|�\}}}}d}|djo9dt|�|i||||d�fd��}nh�|g���fd�}t|||�}dd||fg}|dj o¬||}x�|D]�}td
dtt|��t|��d
} d| �ii|�f}|�jo|id|�n|idt|��|d7}qdWnhg}!}"xÙ|D]Ñ\}#}$}%|#|!joqnd|!|#<|%t j o�|$d+jod|$t|#�}#n;|$d jot|#�}#n|$t|#i d!�d�}#|"id"|#�ii!|%�f�q|"i|#d#�qW|idttd$i"|"����|id%d&i"|��q;Wd't�iit|����iit|��fg}&t#|t$�ohxet%|�D]S}#|#d d(joq�n�ii!t&||#��}%|&id)|
|#|%f�q�Wnddk}| di"|�di"|&�d*�iidi"|i'||| ���S(,s9Return a nice HTML document describing a given traceback.iÿÿÿÿNsPython is: s<body bgcolor="#f0f0f8">s<big><big>%s</big></big>s#ffffffs#6622aas<br>s�
<p>A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.</p>s<tt>s&nbsp;is &nbsp;</tt>s<a href="file://%s">%s</a>t?Rsin t formatvaluecsd�ii|�S(t=(thtmltrepr(R"(tpydoc(s/usr/lib64/python2.6/cgitb.pyt<lambda>~scs>d�|d<z�i�|d�SWd|dcd7<XdS(Nii(tgetline(tlnum(t highlighttfilet linecache(s/usr/lib64/python2.6/cgitb.pyR�ss+<tr><td bgcolor="#d8bbff">%s%s %s</td></tr>s<big>&nbsp;</big>s
<tt>%s%s</tt>s&<tr><td bgcolor="#ffccee">%s</td></tr>s<tr><td>%s</td></tr>iRR s <em>%s</em> RRs %s&nbsp;= %ss <em>undefined</em>s, sF
<table width="100%%" cellspacing=0 cellpadding=0 border=0>
%s</table>s
s <p>%s: %st_s
<br>%s%s&nbsp;=
%ssî


<!-- The above is a description of an error in a Python program, formatted
for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:

%s
-->
(sglobalsbuiltin((tosttypesttimet tracebackR5tinspectR/R t ClassTypet__name__tsystversiontsplitt
executabletctimeR-theadingRtescapetstrRtgetinnerframestpathtabspatht getargvaluestformatargvaluesR)Rtlent preformatRRRR.tjoint
isinstancet
BaseExceptiontdirR
tformat_exception('teinfotcontextR7R8R9R:R;tetypetevaluetetbtpyvertdatetheadtindenttframestrecordsRR2tfunctlinestindextlinktargstvarargstvarkwRtcallRRtrowstiR'tnumtdonetdumpRR(R"t exception((R4R/R5R3s/usr/lib64/python2.6/cgitb.pyR-as�T
"@ 




.






'&
"  c%sùddk}ddk}ddk}ddk}ddk�ddk}ddk�|\}}} t|�|ijo
|i }ndt
i i �ddt
i
}
|i|i��} dt|�|
| fd} g}
|i| |�}x;|D]3\}�}}}}�o|ii��pd�|i|�\}}}}d }|djo3d
||i||||d �fd ��}nh�|g���fd
�}t|||�}d�|fg}|dj oJ||}x=|D]1}d|}|i||i��|d7}qöWnhg}} x½|D]µ\}!}"}#|!|joqCnd||!<|#tj oj|"djod|!}!n)|"djo|"|!i d�d}!n| id|!�ii|#�f�qC| i|!d�qCW|idi| ��|
iddi|��qùWdt|�t|�fg}$t|t�oPxMt|�D];}!�iit ||!��}#|$idd|!|#f�qlWnddk}| d i|
�d i|$�dd i|i!||| ��S(s:Return a plain text document describing a given traceback.iÿÿÿÿNsPython is: s %s
%s
%s
s�
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*Rsin R+csd�ii|�S(R,(RR.(R"(R/(s/usr/lib64/python2.6/cgitb.pyR0Óscs>d�|d<z�i�|d�SWd|dcd7<XdS(Nii(R1(R2(R3R4R5(s/usr/lib64/python2.6/cgitb.pyRÖss %s %ss%5d iRsglobal RRs%s = %ss
undefineds
s
%s
s%s: %ss

%s%s = %st isc

The above is a description of an error in a Python program. Here is
the original traceback:

%s
s ("R7R8R9R:R5R;R/R R<R=R>R?R@RARBRERFRGRHRIRJR)RRtrstripRRR.RMRNRORPR
RQ(%RRRSR7R8R9R:R;RTRURVRWRXRYR[R\RR2R]R^R_RaRbRcRRdRRReRfR'RgRhRiRR(R"Rj((R4R/R5R3s/usr/lib64/python2.6/cgitb.pyR½slT
" 









'
" tHookcBs;eZdZdddddd�Zd�Zdd�ZRS(s?A hook to replace sys.excepthook that shows tracebacks in HTML.iiR-cCs;||_||_||_|pti|_||_dS(N(tdisplaytlogdirRSR>tstdoutR4tformat(tselfRnRoRSR4Rq((s/usr/lib64/python2.6/cgitb.pyt__init__s
   cCs|i|||f�dS(N(thandle(RrRTRURV((s/usr/lib64/python2.6/cgitb.pyt__call__ sc
Csþ|p
ti�}|idjo|iit��n|idjotpt}t}y|||i �}Wn1ddk
}di |i |��}t
}nX|ioY|o:|idd�idd�}|iid|d �q|ii|d
�n|iid �|idj oµddk}ddk}d d
g|idj}|id|d|i�\} }
y7|i| d�} | i|�| i�d|
} Wnd|
} nX|ii| d
�ny|ii�WnnXdS(NR-iÿÿÿÿRt&s&amp;t<s&lt;s<pre>s</pre>
s
s*<p>A problem occurred in a Python script.
s.txts.htmltsuffixRPtws.<p> %s contains the description of this error.s.<p> Tried to save traceback to %s, but failed.(R>texc_infoRqR4twriteRR-RtFalseRSR:RMRQtTrueRntreplaceRoRR7ttempfiletmkstemptfdopentclosetflush(
Rrtinfot formattertplaintdocR:R7RRxtfdRGR4tmsg((s/usr/lib64/python2.6/cgitb.pyRtsB 

!

N(R=t
__module__t__doc__RRsRuRt(((s/usr/lib64/python2.6/cgitb.pyRms
   iR-c Cs(td|d|d|d|�t_dS(sInstall an exception handler that formats tracebacks as HTML.

The optional argument 'display' can be set to 0 to suppress sending the
traceback to the browser, and 'logdir' can be set to a directory to cause
tracebacks to be written to files there.RnRoRSRqN(RmR>t
excepthook(RnRoRSRq((s/usr/lib64/python2.6/cgitb.pytenable7s((R�t
__author__t __version__R>RRRRRRR)R-RRmRtthandlerRR�(((s/usr/lib64/python2.6/cgitb.pyt<module>s 
      \ D5