Your IP : 3.145.58.141


Current Path : /opt/alt/python34/lib64/python3.4/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/unittest/__pycache__/signals.cpython-34.pyc

�
j fc	�@s�ddlZddlZddlmZdZGdd�de�Zej�Zdd�Z	dd	�Z
dad
d�Zddd
�Z
dS)�N)�wrapsTc@s(eZdZdd�Zdd�ZdS)�_InterruptHandlercCsvd|_||_t|t�ri|tjkr<tj}qi|tjkrZdd�}qitd��n||_	dS)NFcSsdS)N�)Z
unused_signumZunused_framerr�5/opt/alt/python34/lib64/python3.4/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__cCs{tjtj�}||k	r1|j||�n|jrM|j||�nd|_xtj�D]}|j�qcWdS)NT)r�	getsignal�SIGINTrr�_results�keys�stop)rZsignumZframeZinstalled_handler�resultrrr�__call__s		z_InterruptHandler.__call__N)�__name__�
__module__�__qualname__rrrrrrr	srcCsdt|<dS)N�)r)rrrr�registerResult*srcCsttj|d��S)N)�boolr�pop)rrrr�removeResult-sr cCsDtdkr@tjtj�}t|�atjtjt�ndS)N)�_interrupt_handlerrrrr)rrrr�installHandler1sr"csW�dk	r.t���fdd��}|Stdk	rStjtjtj�ndS)NcsEtjtj�}t�z�||�SWdtjtj|�XdS)N)rrr�
removeHandler)�args�kwargs�initial)�methodrr�inner;s
zremoveHandler.<locals>.inner)rr!rrr)r'r(r)r'rr#9s
r#)r�weakref�	functoolsrZ
__unittest�objectr�WeakKeyDictionaryrrr r!r"r#rrrr�<module>s 

?>