Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/flask/__pycache__/debughelpers.cpython-39.pyc
Ðазад
a p�hK � @ s� d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddl m Z dd lmZ G d d� de e�ZeG dd � d ee ��ZG dd� de �Zdd� Zdd� Zdd� Zdd� ZdS )z� flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: 2010 Pallets :license: BSD-3-Clause � N)�warn� )�implements_to_string)� text_type)�Flask)� Blueprint)�_request_ctx_stackc @ s e Zd ZdZdS )�UnexpectedUnicodeErrorzjRaised in places where we want some better error reporting for unexpected unicode or binary data. N)�__name__� __module__�__qualname__�__doc__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/flask/debughelpers.pyr s r c @ s e Zd ZdZdd� Zdd� ZdS )�DebugFilesKeyErrorz�Raised from request.files during debugging. The idea is that it can provide a better error message than just a generic KeyError/BadRequest. c C sN |j �|�}d||jf g}|r>|�dd�dd� |D �� � d�|�| _d S )Na% You tried to access the file "%s" in the request.files dictionary but it does not exist. The mimetype for the request is "%s" instead of "multipart/form-data" which means that no file contents were transmitted. To fix this error you should provide enctype="multipart/form-data" in your form.zI The browser instead transmitted some file names. This was submitted: %sz, c s s | ]}d | V qdS )z"%s"Nr ��.0�xr r r � <genexpr>. � z.DebugFilesKeyError.__init__.<locals>.<genexpr>� )�form�getlist�mimetype�append�join�msg)�self�request�keyZform_matches�bufr r r �__init__! s ����zDebugFilesKeyError.__init__c C s | j S �N)r )r r r r �__str__2 s zDebugFilesKeyError.__str__N)r r r r r! r# r r r r r s r c @ s e Zd ZdZdd� ZdS )�FormDataRoutingRedirectz�This exception is raised by Flask in debug mode if it detects a redirect caused by the routing system when the request method is not GET, HEAD or OPTIONS. Reasoning: form data will be dropped. c C sr |j }d|j|jf g}|jd |j�d�d kr<|�d� |�d|j � |�d� t�| d� |�� d �� d S ) NzjA request was sent to this URL (%s) but a redirect was issued automatically by the routing system to "%s".�/�?r z� The URL was defined with a trailing slash so Flask will automatically redirect to the URL with the trailing slash if it was accessed without one.z� Make sure to directly send your %s-request to this URL since we can't make browsers or HTTP clients redirect with form data reliably or without user interaction.z3 Note: this exception is only raised in debug moder zutf-8)Zrouting_exception�url�new_url�base_url�splitr �method�AssertionErrorr! r �encode)r r �excr r r r r! <