| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/ipalib/__pycache__/ |
Upload File : |
a
�ji� � @ sp d Z ddlZddlZddlmZmZ ddlmZ e�� Z G dd� d�Z
ejdd� �ZG d d
� d
e�Z
dd� ZdS )
z
Per-request thread-local data.
� N)�ReadOnly�lock)�CALLABLE_ERRORc @ s e Zd ZdS )�
_FrameContextN)�__name__�
__module__�__qualname__� r r �2/usr/lib/python3.9/site-packages/ipalib/request.pyr $ s r c c s| z
t j} W n ty Y n0 t� t _z,d V W z
| t _W qx tyP t `Y qx0 n$z
| t _W n tyt t `Y n0 0 d S )N)�contextZ
current_frame�AttributeErrorr �UnboundLocalError)Z
frame_backr r r
�
context_frame( s
�
r c @ s e Zd ZdZdd� ZdS )�
ConnectionzH
Base class for connection objects stored on `request.context`.
c C s6 || _ t|�s$ttd|t|�f ��|| _t| � d S )N�
disconnect)�conn�callable� TypeErrorr �typer r )�selfr r r r r
�__init__= s �zConnection.__init__N)r r r �__doc__r r r r r
r 8 s r c C s4 t tj�� �D ]} t| t�r| �� qtj�� dS )zB
Delete all attributes on thread-local `request.context`.
N)�listr �__dict__�values�
isinstancer r �clear)�valuer r r
�destroy_contextG s
r )r �
contextlib� threadingZipalib.baser r Zipalib.constantsr �localr r �contextmanagerr r r r r r r
�<module> s