Wcc csddlZddlZddlmZdZGddeZejZdZ dZ da dZ d d Z dS) iN)wrapsTcseZdZdZdZdS)_InterruptHandlercsd|_||_t|trM|tj krtj }n&|tjkrd}n td||_ dS)NFcsdSN)Z unused_signumZ unused_frame )/usr/lib64/python3.12/unittest/signals.pydefault_handlerz3_InterruptHandler.__init__..default_handlersDzYexpected SIGINT signal handler to be signal.SIG_IGN, signal.SIG_DFL, or a callable object) calledoriginal_handlerZ isinstanceZintsignalZSIG_DFLZdefault_int_handlerZSIG_IGNZ TypeErrorr)selfrrr__init__z_InterruptHandler.__init__ s / os + +&..00"("<"< FNN22 !233 /rcs"tjtj}||ur|j|||jr|j||d|_t j D]}|jdS)NT)r getsignalSIGINTrr_resultsZkeysZstop)r ZsignumZframeZinstalled_handlerresults r__call__z_InterruptHandler.__call__s",,V]]; D ( (   / / ;;;   / / mmo  F KKMMM  rN)Z__name__Z __module__Z __qualname__r rrrrrr s2///$     rrcsdt|<dS)Ni)rr rregisterResultr*sHVrcsHttj|dSr)ZboolrZpoprrr removeResultr-s  VT* ++rcstatjtj}t |atjtjtdSdSr)_interrupt_handlerr r rr)rrrinstallHandlerr1sK! **6==9.? fmm%78888"!rcstfd}|St8tjtjtjdSdS)Ncs tjtj}t |i|tjtj|S#tjtj|wxYwr)r r r removeHandler)ZargsZkwargsZinitialmethods rinnerzremoveHandler..inner;sn&&v}}5G OO 6vt.v.. fmmW555 fmmW555555s A$$)B )rrr rr )rrs` rrr9sg  v 6 6 6 6  6 % fmm%7%H%HIIII&%rr)r ZweakrefZ functoolsrZ __unittestZobjectrZWeakKeyDictionaryrrrrrrrrrrs   @ %7 $ $ &,,,999JJJJJJr