AlkantarClanX12
Current Path : /opt/alt/python310/lib64/python3.10/unittest/__pycache__/ |
Current File : //opt/alt/python310/lib64/python3.10/unittest/__pycache__/signals.cpython-310.opt-2.pyc |
o 6��fc � @ sb d dl Z d dlZd dlmZ dZG dd� de�Ze�� Zdd� Z dd � Z dad d� Zddd �Z dS )� N)�wrapsTc @ s e Zd Zdd� Zdd� ZdS )�_InterruptHandlerc C sN d| _ || _t|t�r"|tjkrtj}n|tjkrdd� }ntd��|| _ d S )NFc S s d S �N� )Z unused_signumZunused_framer r �7/opt/alt/python310/lib64/python3.10/unittest/signals.py�default_handler s z3_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 )�selfr r r r �__init__ s z_InterruptHandler.__init__c C sR t �t j�}|| ur| �||� | jr| �||� d| _t�� D ]}|�� q d S )NT)r � getsignal�SIGINTr r �_results�keys�stop)r Zsignum�frameZinstalled_handler�resultr r r �__call__ s �z_InterruptHandler.__call__N)�__name__� __module__�__qualname__r r r r r r r s r c C s dt | <