![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/twisted/python/__pycache__/ |
o �bi � @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlZddl m Z dadZG dd� de �Zd#d d�ZdZG d d� de �Zdd� ZG dd� d�ZG dd� d�ZG dd� d�Zg Zdd� ZG dd� de�Zdd� ZdZddddejfdd �Zd!d"� ZdS )$z9 Asynchronous-friendly error mechanism. See L{Failure}. � N)�getmro)�StringIO)�reflect� c @ s e Zd ZdS )�DefaultExceptionN)�__name__� __module__�__qualname__� r r �8/usr/lib/python3/dist-packages/twisted/python/failure.pyr s r �defaultc C sx |dvrt d|f ��|}|dkr*| D ]\}}}}}||� d|� d|� d�� qdS |dkrT| D ]!\}}}}}|d|� d|� d |� d�� |d t�||��� � q0dS |dkrq| D ]\}}}}}|d|||f � qZ|d � dS |dkr�| D ]B\}}}}}|d|||f � |d� |D ]\} } |d| � dt| �� d�� q�|d� |D ]\} } |d| � dt| �� d�� q�qwdS dS )a� Format and write frames. @param frames: is a list of frames as used by Failure.frames, with each frame being a list of (funcName, fileName, lineNumber, locals.items(), globals.items()) @type frames: list @param write: this will be called with formatted strings. @type write: callable @param detail: Four detail levels are available: default, brief, verbose, and verbose-vars-not-captured. C{Failure.printDetailedTraceback} uses the latter when the caller asks for verbose, but no vars were captured, so that an explicit warning about the missing data is shown. @type detail: string )r �brief�verbose�verbose-vars-not-capturedzNDetail must be default, brief, verbose, or verbose-vars-not-captured. (not %r)r �:� r z File "z", line z, in z %s r z%s:%d: %s(...) zA [Capture of Locals and Globals disabled (use captureVars=True)] r z [ Locals ] z z : z ( Globals ) N)� ValueError� linecache�getline�strip�repr)�frames�write�detail�w�method�filename�lineno� localVars� globalVars�name�valr r r � format_frames# s@ ������r"