Your IP : 3.140.198.3


Current Path : /opt/alt/python310/lib64/python3.10/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/unittest/__pycache__/signals.cpython-310.pyc

o

6��fc	�@sbddlZddlZddlmZdZGdd�de�Ze��Zdd�Z	dd	�Z
dad
d�Zddd
�Z
dS)�N)�wrapsTc@seZdZdd�Zdd�ZdS)�_InterruptHandlercCsNd|_||_t|t�r"|tjkrtj}n|tjkrdd�}ntd��||_	dS)NFcSsdS�N�)Z
unused_signumZunused_framerr�7/opt/alt/python310/lib64/python3.10/unittest/signals.py�default_handlersz3_InterruptHandler.__init__.<locals>.default_handlerzYexpected SIGINT signal handler to be signal.SIG_IGN, signal.SIG_DFL, or a callable object)
�called�original_handler�
isinstance�int�signal�SIG_DFL�default_int_handler�SIG_IGN�	TypeErrorr)�selfrrrr�__init__
s




z_InterruptHandler.__init__cCsRt�tj�}||ur|�||�|jr|�||�d|_t��D]}|��q dS)NT)r�	getsignal�SIGINTrr�_results�keys�stop)rZsignum�frameZinstalled_handler�resultrrr�__call__s
�z_InterruptHandler.__call__N)�__name__�
__module__�__qualname__rrrrrrr	srcCsdt|<dS)N�)r�rrrr�registerResult*sr cCstt�|d��Sr)�boolr�poprrrr�removeResult-sr#cCs2tdurt�tj�}t|�at�tjt�dSdSr)�_interrupt_handlerrrrr)rrrr�installHandler1s
�r%cs@�durt���fdd��}|Stdurt�tjtj�dSdS)Nc
sBt�tj�}t�z�|i|��Wt�tj|�St�tj|�wr)rrr�
removeHandler)�args�kwargs�initial��methodrr�inner;s
 zremoveHandler.<locals>.inner)rr$rrr	)r+r,rr*rr&9s�r&r)r�weakref�	functoolsrZ
__unittest�objectr�WeakKeyDictionaryrr r#r$r%r&rrrr�<module>s 

?>