Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/werkzeug/debug/__pycache__/tbtools.cpython-39.pyc
Ðазад
a ^�h�K � @ sX d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl m Z d dlmZ d dl mZ d dl mZ ddlmZ ddlmZ dd lmZ d dlmZ e�d�Ze�d ej�Ze�d�ZdZdZed e d Zed e Z dZ!dZ"dZ#d'e$e%e$d�dd�Z&d(e%e%e'dd�dd�Z(G d d!� d!�Z)G d"d� d�Z*G d#d$� d$�Z+G d%d&� d&�Z,dS ))� N)�escape)� TokenError)�CodeType)� TracebackType� )�_to_str)�get_filesystem_encoding)�cached_property� )�Consoles coding[:=]\s*([-\w.]+)s ^(.*?)$z+^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)a� <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>%(title)s // Werkzeug Debugger</title> <link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css" type="text/css"> <!-- We need to make sure this has a favicon so that the debugger does not accidentally trigger a request to /favicon.ico which might change the application's state. --> <link rel="shortcut icon" href="?__debugger__=yes&cmd=resource&f=console.png"> <script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script> <script type="text/javascript"> var TRACEBACK = %(traceback_id)d, CONSOLE_MODE = %(console)s, EVALEX = %(evalex)s, EVALEX_TRUSTED = %(evalex_trusted)s, SECRET = "%(secret)s"; </script> </head> <body style="background-color: #fff"> <div class="debugger"> a� <div class="footer"> Brought to you by <strong class="arthur">DON'T PANIC</strong>, your friendly Werkzeug powered traceback interpreter. </div> </div> <div class="pin-prompt"> <div class="inner"> <h3>Console Locked</h3> <p> The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server. <form> <p>PIN: <input type=text name=pin size=14> <input type=submit name=btn value="Confirm Pin"> </form> </div> </div> </body> </html> a� <h1>%(exception_type)s</h1> <div class="detail"> <p class="errormsg">%(exception)s</p> </div> <h2 class="traceback">Traceback <em>(most recent call last)</em></h2> %(summary)s <div class="plain"> <p> This is the Copy/Paste friendly version of the traceback. </p> <textarea cols="50" rows="10" name="code" readonly>%(plaintext)s</textarea> </div> <div class="explanation"> The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. <span class="nojavascript"> If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.</span> </div> z <!-- %(plaintext_cs)s --> a+ <h1>Interactive Console</h1> <div class="explanation"> In this console you can execute Python expressions in the context of the application. The initial namespace was created by the debugger automatically. </div> <div class="console"><div class="inner">The Console requires JavaScript.</div></div> zU<div class="%(classes)s"> %(title)s <ul>%(frames)s</ul> %(description)s </div> a <div class="frame" id="frame-%(id)d"> <h4>File <cite class="filename">"%(filename)s"</cite>, line <em class="line">%(lineno)s</em>, in <code class="function">%(function_name)s</code></h4> <div class="source %(library)s">%(lines)s</div> </div> zV<tr class="%(classes)s"> <td class=lineno>%(lineno)s</td> <td>%(code)s</td> </tr> T)�secret�evalex_trusted�returnc C s t d|rdnddd| dd� S )N�true�falser ���)�evalexr �console�titler �traceback_id)�CONSOLE_HTML)r r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/werkzeug/debug/tbtools.py�render_console_html� s �r F� Traceback)�ignore_system_exceptions�show_hidden_frames�skipr c C s~ t �t jt jt ttf t�� �}|\}}}| r@|tt t hv r@� t|�D ]}|jdu rZ qb|j}qHt |||�}|sz|�� |S )a Get the current exception info as `Traceback` object. Per default calling this method will reraise system exceptions such as generator exit, system exit or others. This behavior can be disabled by passing `False` to the function as first parameter. N)�t�cast�Tuple�Type� BaseExceptionr �sys�exc_info� SystemExit�KeyboardInterrupt� GeneratorExit�range�tb_nextr �filter_hidden_frames)r r r �info�exc_type� exc_value�tb�_r r r �get_current_traceback� s$ � � r0 c @ sL e Zd ZdZdZeedd�dd�Zee j e d�dd ��Zed�d d�ZdS )�LinezHelper for the source renderer.��lineno�code�in_frame�currentN)r3 r4 r c C s || _ || _d| _d| _d S )NFr2 )�selfr3 r4 r r r �__init__� s z Line.__init__�r c C s* dg}| j r|�d� | jr&|�d� |S )N�linezin-framer6 )r5 �appendr6 )r7 �rvr r r �classes� s zLine.classesc C s t d�| j�| jt| j�d� S )N� )r= r3 r4 )�SOURCE_LINE_HTML�joinr= r3 r r4 �r7 r r r �render� s �zLine.render) �__name__� __module__�__qualname__�__doc__� __slots__�int�strr8 �propertyr �Listr= rB r r r r r1 � s r1 c @ s� e Zd ZdZeje eedd�dd�Zdd�dd�Z e ed�d d ��Ze e d�dd��Zdejeje dd �dd�Zdee d�dd�Zdeeje ee d�dd�Zee d�dd��Ze ed�dd��ZdS )r zWraps a traceback.N�r, r- r. r c C s� || _ || _|| _|j}|jdvr2|j� d|� �}|| _g | _t� }| j�t |||�� |� t|�� |jpp|j }|d u s�t|�|v r�q�t|�}|j}qD| j�� dd� | jD �| _d S )N> �builtins� exceptions�__builtin__�.c S s g | ]}|j D ]}|�qqS r ��frames��.0�group�framer r r � <listcomp>� � z&Traceback.__init__.<locals>.<listcomp>)r, r- r. rC rD �exception_type�groups�setr; �Group�add�id� __cause__�__context__�type� __traceback__�reverserR )r7 r, r- r. rY �memor r r r8 � s$ zTraceback.__init__r9 c C s2 | j D ]}|�� qdd� | j D �| jdd�<