???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................3
2a.                 @   s   d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	dd Z
g Zdd Zdd Zdd	 Zd
d Zdd ZdddZdddZG dd dZe jZdddZdS )    Nc               C   s   dS )Na'  <!--: 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> r   r   r   */opt/alt/python36/lib64/python3.6/cgitb.pyreset#   s    r   c             C   s   | rd|  d S dS d S )Nz<small>z</small> r   )textr   r   r   small.   s    r   c             C   s   | rd|  d S dS d S )Nz<strong>z	</strong>r   r   )r   r   r   r   strong4   s    r   c             C   s   | rd|  d S dS d S )Nz<font color="#909090">z</font>r   r   )r   r   r   r   grey:   s    r	   c             C   s   | |krd||  fS | |j kr,d|j |  fS d|j kr~|j d }t|ti krf| |kr~d||  fS nt|| r~dt|| fS d tfS )Nlocalglobal__builtins__builtin)	f_globalstypehasattrgetattr	__UNDEF__)nameframelocalsbuiltinsr   r   r   lookup@   s    



r   c             C   s   g d d dt f\}}}}}xtj| D ]\}}	}
}}|tjkr>P |tjkr|	tjkr|dkr|t k	rt||	t }|j||	 ||f qt	|	||\}}|j|	||f n"|	dkr||d 7 }|}nd\}}|	}q$W |S )Nr   .)Nr   )
r   tokenizegenerate_tokensNEWLINENAMEkeywordkwlistr   appendr   )readerr   r   varsZ	lasttokenparentprefixvalueZttypetokenstartendlinewherer   r   r   scanvarsP   s"    
 r*      c       "   	      s  | \}}}t |tr|j}dtjj d  d tj }tjtj }dt	j
jdtt	j
jt| dd|d |  d	 }d
tdd  d }g }	tj||}
xJ|
D ]@\} }}}} rtjj  d t	j
j f }nd  }tj|\}}}}d}|dkr2dtt	j
j| tj||||dd d }i |gf fdd	}t|||}dd||f g}|d k	r|| }x|D ]}tddtt|  t| d }|krd|t	j
j|f }|jd|  n&d|t	j
j|f }|jdt|  |d7 }q~W i g  }}x|D ]\}}} ||kr0qd||< | tk	r|d,kr^d | t| }n*|d!krrt|}n|t|jd"d-  }|jd#|t	j
j| f  n|j|d$  qW |jdttd%j|  |	jd&d'j|  qW d(tt	j
jt|t	j
jt|f g}!xNt|D ]B}|d d d)kr:q t	j
jt ||} |!jd*||| f  q W |dj|	 dj|! d+t	j
jdjt!j"|||  S ).NzPython r   z: z<body bgcolor="#f0f0f8">z<big><big>%s</big></big>z#ffffffz#6622aaz<br>z
<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>z<tt>z&nbsp;r+   z&nbsp;</tt>z<a href="file://%s">%s</a>?r   zin c             S   s   dt jj|  S )N=)pydochtmlrepr)r$   r   r   r   <lambda>   s    zhtml.<locals>.<lambda>)formatvaluec                s4   d| d < zt j | d S | d  d7  < X d S )N   r   )	linecachegetline)lnum)file	highlightr   r   r       s     zhtml.<locals>.readerz+<tr><td bgcolor="#d8bbff">%s%s %s</td></tr>z<big>&nbsp;</big>z<tt>=&gt;%s%s</tt>z&<tr><td bgcolor="#ffccee">%s</td></tr>z<tt>&nbsp;&nbsp;%s%s</tt>z<tr><td>%s</td></tr>r3   r   r   z<em>%s</em> r
   r   z%s&nbsp;= %sz <em>undefined</em>z, zF
<table width="100%%" cellspacing=0 cellpadding=0 border=0>
%s</table>
z	<p>%s: %s_z
<br>%s%s&nbsp;=
%sz


<!-- 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
-->
)r   r   )#
isinstancer   __name__sysversionsplit
executabletimectimer.   r/   headingr   escapestrr   inspectgetinnerframesospathabspathgetargvaluesformatargvaluesr*   lenZ	preformatr   r	   r   r0   joindirr   	tracebackformat_exception)"einfocontextetypeevalueetbpyverdateheadindentframesrecordsr   r6   funclinesindexlinkargsvarargsvarkwr   callr    r!   rowsir(   numdonedumpr   r)   r$   	exceptionr   )r7   r8   r   r/   e   s|    

0


$


 



 	r/   c           	      s  | \}}}t |tr|j}dtjj d  d tj }tjtj }dt	|||f d }g }t
j||}	x|	D ]\}
 }}}} rtjj pd t
j|
\}}}}d}|dkrd| t
j||||d	d
 d }i |gf fdd	}t||
|}d |f g}|d k	rL|| }x0|D ](}d| }|j||j   |d7 }q W i g  }}x|D ]\}}}||krtq\d||< |tk	r|dkrd| }n|dkr||jdd  }|jd|tjj|f  n|j|d  q\W |jdj| |jddj|  qrW dt	|t	|f g}x8t|D ],}tjjt||}|jdd||f  q.W |dj| dj| ddjtj|||  S ) NzPython r   z: 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,   r   zin c             S   s   dt jj|  S )Nr-   )r.   r   r0   )r$   r   r   r   r1      s    ztext.<locals>.<lambda>)r2   c                s4   d| d < zt j | d S | d  d7  < X d S )Nr3   r   )r4   r5   )r6   )r7   r8   r   r   r       s     ztext.<locals>.readerz %s %sz%5d r3   r   zglobal r
   r   z%s = %sz
 undefinedr9   z
%s
z%s: %sz

%s%s = %s    zc

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

%s
r;   z    )r<   r   r=   r>   r?   r@   rA   rB   rC   rF   rG   rH   rI   rJ   rK   rL   rM   r*   r   rstripr   r.   r   r0   rO   rP   r   rQ   rR   ) rS   rT   rU   rV   rW   rX   rY   rZ   r\   r]   r   r6   r^   r_   r`   rb   rc   rd   r   re   r    r!   rf   rg   r(   rh   ri   rj   r   r)   r$   rk   r   )r7   r8   r   r      s^    





 

 

 r   c               @   s(   e Zd ZdddZdd Zdd	d
ZdS )Hookr3   Nr+   r/   c             C   s(   || _ || _|| _|ptj| _|| _d S )N)displaylogdirrT   r>   stdoutr7   format)selfrp   rq   rT   r7   rs   r   r   r   __init__  s
    zHook.__init__c             C   s   | j |||f d S )N)handle)rt   rU   rV   rW   r   r   r   __call__  s    zHook.__call__c       
      C   sz  |p
t j }| jdkr$| jjt  | jdkr2tp4t}d}y||| j}W n    dj	t
j| }d}Y nX | jr|rtjj|}| jjd| d  q| jj|d  n| jjd | jd k	rZd	d
g| jdk }tj|| jd\}}y.tj|d}|j| W d Q R X d| }	W n   d| }	Y nX | jdkrJ| jjd|	  n| jj|	d  y| jj  W n   Y nX d S )Nr/   Fr   Tz<pre>z</pre>
r9   z*<p>A problem occurred in a Python script.
z.txtz.html)suffixrP   wz*%s contains the description of this error.z*Tried to save traceback to %s, but failed.z
<p>%s</p>
)r>   exc_infors   r7   writer   r/   r   rT   rO   rQ   rR   rp   r.   rE   rq   tempfileZmkstemprI   fdopenflush)
rt   info	formatterZplaindocrx   fdrJ   r7   msgr   r   r   rv     s@    

 zHook.handle)r3   Nr+   Nr/   )N)r=   
__module____qualname__ru   rw   rv   r   r   r   r   ro      s    
ro   r3   c             C   s   t | |||dt_d S )N)rp   rq   rT   rs   )ro   r>   
excepthook)rp   rq   rT   rs   r   r   r   enable8  s    r   )r+   )r+   )r3   Nr+   r/   )rG   r   r4   rI   r.   r>   r|   rB   r   rQ   r   r   r   r   r	   r   r*   r/   r   ro   rv   Zhandlerr   r   r   r   r   <module>   s*   

Z
A7